Page 1 of 1

SPL - anyone had any luck?

PostPosted: September 13th, 2006, 2:12 am
by jfburns@codeplex
I'm trying to use classes that utilize SPL ( http://us2.php.net/manual/en/ref.spl.php ) but compilation fails with the following error:

CompileError: The class 'MyClass' is incomplete - its base class or interface is unknown.

MyClass.php looks like this:

abstract class MyClass extends MyOtherClass implements Countable, IteratorAggregate, Serializable { ... }

Thanks for your input.


RE: SPL - anyone had any luck?

PostPosted: September 13th, 2006, 2:23 am
by jfburns@codeplex
getdeclaredinterfaces() is showing me that Countable is the culprit. Any ideas/workarounds?

RE: SPL - anyone had any luck?

PostPosted: September 13th, 2006, 3:07 am
by jfburns@codeplex
OK I got this working by hard coding the interfaces.

RE: SPL - anyone had any luck?

PostPosted: September 13th, 2006, 10:06 am
by HDaniel@codeplex
Hi,

currently SPL isn't bundled because the work is still in progress. If you need the interfaces, exceptions or classdefinitions you may use the PHP-files in the source-distribution in Libraries/SPL. There should be everything what can be found in current PHP version 5.1.x.

Daniel