note 109603 deleted from class.sessionhandlerinterface by danbrown
| From: | danbrown@php.net | Date: | Fri, 10 Aug 2012 16:22:32 +0000 |
| Subject: | note 109603 deleted from class.sessionhandlerinterface by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-190022@lists.php.net to get a copy of this message | ||
Note Submitter: Adam
----
If, like PHPaficionado, you're using namespaces and getting 'interface not found',
it's because you're not referencing the interface at the root namespace.
For example:
use SomeNamespace;
class SessionHandler implements SessionHandlerInterface {
...
}
This is actually saying you implement the class
SomeNamespace\SessionHandlerInterface.
Instead, you need to use the root namespace:
use SomeNamespace;
class SessionHandler implements \SessionHandlerInterface {
...
}
This is a fairly fundamental concept of using namespaces, so if you're having trouble with it,
make sure you read through the docs on namespaces at http://php.net/manual/en/language.namespaces.php