note 109603 added to class.sessionhandlerinterface

From: Date: Wed, 01 Aug 2012 11:23:47 +0000
Subject: note 109603 added to class.sessionhandlerinterface
Groups: php.notes 
Request: Send a blank email to php-notes+get-189560@lists.php.net to get a copy of this message
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 ---- Server IP: 69.147.83.197 Probable Submitter: 58.174.26.84 ---- Manual Page -- http://www.php.net/manual/en/class.sessionhandlerinterface.php Edit -- https://master.php.net/note/edit/109603 Del: integrated -- https://master.php.net/note/delete/109603/integrated Del: useless -- https://master.php.net/note/delete/109603/useless Del: bad code -- https://master.php.net/note/delete/109603/bad+code Del: spam -- https://master.php.net/note/delete/109603/spam Del: non-english -- https://master.php.net/note/delete/109603/non-english Del: in docs -- https://master.php.net/note/delete/109603/in+docs Del: other reasons-- https://master.php.net/note/delete/109603 Reject -- https://master.php.net/note/reject/109603 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#189560) next »