Modified: trunk/Sungrazr/Server/Handler.php (97 => 98)
--- trunk/Sungrazr/Server/Handler.php 2007-12-18 07:01:15 UTC (rev 97)
+++ trunk/Sungrazr/Server/Handler.php 2007-12-18 23:14:42 UTC (rev 98)
@@ -60,6 +60,33 @@
/**
*
+ * Web Services request type, picked from last segment of the caller's
+ * class name and lowercased. (Ex: jsonrpc, xmlrpc, rest, etc.)
+ *
+ * @var string
+ *
+ */
+ protected $_type;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param array $config User-provided configuration values.
+ *
+ */
+ public function __construct($config = null)
+ {
+ parent::__construct($config);
+
+ if (is_object($this->_config['caller'])) {
+ $caller_class = get_class($this->_config['caller']);
+ $this->_type = strtolower(end(explode('_', $caller_class)));
+ }
+ }
+
+ /**
+ *
* Return the fault
*
* @return array