On 4 Jul, 09:30, [EMAIL PROTECTED] wrote:
> It would seem to be the case that if you implement a service using a
> class that implements an interface then SCA doesn't recognize it as a
> service. For example, with the service:
>
> /**
> * @service
> * @binding.restresource
> * @types urn::orderNS Orders.xsd
> */
> class Orders implements SCA_Bindings_restresource_ResourceTemplate
> {
>
> I get the
>
> SCA::initComponent - included by a client script that is not a
> component In the log. Am just investigating now but I'm assuming this
> is not by design.
>
> Simon
An update...
It seems that PHP does not recognize a class that implements an
interface as declared in the code before the class declaration is
placed [1]. As our SCA.php include comes before the class declaration
the class_exists test in the
_includedByAClientScriptThatIsNotAComponent() funtion is bailing out.
The use of an interface in my example is not mandatory, just a
convenience. The immediate solutions are to either
- Stop using the interface
- move the SCA.php include to the bottom of the file
Both provide satisfaction but reduce flexibility for the user. Anyone
know how to get round this class_exists issue?
[1] - http://php.benscom.com/manual/en/language.oop5.interfaces.php
search for class_exists
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"phpsoa" group.
To post to this group, send email to phpsoa@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.co.uk/group/phpsoa?hl=en
-~----------~----~----~----~------~----~------~--~---