public function introspect($serviceClass, $options = array())
    {
        $this->_options = $options;

        if (strpbrk($serviceClass, '\\/<>')) {
            return $this->_returnError('Invalid service name');
        }

        // Transform com.foo.Bar into com_foo_Bar
        $serviceClass = str_replace('.' , '_', $serviceClass);

        // Introspect!
        if (!class_exists($serviceClass)) {
            require_once 'Zend/Loader.php';
            Zend_Loader::loadClass($serviceClass, $this->_getServicePath());
        }

        $serv = $this->_xml->createElement('service-description');
        $serv->setAttribute('xmlns', 'http://ns.adobe.com/flex/service-description/2008');

        $this->_types = $this->_xml->createElement('types');
        $this->_ops   = $this->_xml->createElement('operations');

        $r = Zend_Server_Reflection::reflectClass($serviceClass);
        $this->_addService($r, $this->_ops);

        $serv->appendChild($this->_types);
        $serv->appendChild($this->_ops);
        $this->_xml->appendChild($serv);

        return $this->_xml->saveXML();
    }
public function introspect($serviceClass, $options = array())
    {
        $this->_options = $options;

        if (strpbrk($serviceClass, '\\/<>')) {
            return $this->_returnError('Invalid service name');
        }

        // Transform com.foo.Bar into com_foo_Bar
        $serviceClass = str_replace('.' , '_', $serviceClass);

        // Introspect!
        if (!class_exists($serviceClass)) {
            require_once 'Zend/Loader.php';
            Zend_Loader::loadClass($serviceClass, $this->_getServicePath());
        }

        $serv = $this->_xml->createElement('service-description');
        $serv->setAttribute('xmlns', 'http://ns.adobe.com/flex/service-description/2008');

        $this->_types = $this->_xml->createElement('types');
        $this->_ops   = $this->_xml->createElement('operations');

        $r = Zend_Server_Reflection::reflectClass($serviceClass);
        $this->_addService($r, $this->_ops);

        $serv->appendChild($this->_types);
        $serv->appendChild($this->_ops);
        $this->_xml->appendChild($serv);

        return $this->_xml->saveXML();
    }
public function introspect ( $ serviceClass , $ options = array ( ) ) { $ this -> _options = $ options ; if ( strpbrk ( $ serviceClass , '\\/<>' ) ) { return $ this -> _returnError ( 'Invalid service name' ) ; } // Transform com.foo.Bar into com_foo_Bar $ serviceClass = str_replace ( '.' , '_' , $ serviceClass ) ; // Introspect! if ( ! class_exists ( $ serviceClass ) ) { require_once 'Zend/Loader.php' ; Zend_Loader :: loadClass ( $ serviceClass , $ this -> _getServicePath ( ) ) ; } $ serv = $ this -> _xml -> createElement ( 'service-description' ) ; $ serv -> setAttribute ( 'xmlns' , 'http://ns.adobe.com/flex/service-description/2008' ) ; $ this -> _types = $ this -> _xml -> createElement ( 'types' ) ; $ this -> _ops = $ this -> _xml -> createElement ( 'operations' ) ; $ r = Zend_Server_Reflection :: reflectClass ( $ serviceClass ) ; $ this -> _addService ( $ r , $ this -> _ops ) ; $ serv -> appendChild ( $ this -> _types ) ; $ serv -> appendChild ( $ this -> _ops ) ; $ this -> _xml -> appendChild ( $ serv ) ; return $ this -> _xml -> saveXML ( ) ; }
Create XML definition on an AMF service class

@param  string $serviceClass Service class name
@param  array $options invocation options
@return string XML with service class introspection
Create XML definition on an AMF service class