From 4aa6ebc679fa876250e44141140bf15a41d6d0bb Mon Sep 17 00:00:00 2001 From: Gunnar Wrobel
Date: Wed, 17 Mar 2010 08:29:52 +0100 Subject: [PATCH] Horde_Kolab_Session_Interface -> Horde_Kolab_Session --- framework/Auth/lib/Horde/Auth/Kolab.php | 8 ++++---- .../Auth/test/Horde/Auth/Kolab/Class/KolabTest.php | 6 +++--- .../Core/lib/Horde/Core/Factory/KolabSession.php | 8 ++++---- .../test/Horde/Core/Factory/KolabSessionTest.php | 12 ++++++------ .../Kolab/{Session/Interface.php => Session.php} | 2 +- .../Kolab_Session/lib/Horde/Kolab/Session/Base.php | 2 +- .../Horde/Kolab/Session/Decorator/Anonymous.php | 14 +++++++------- .../lib/Horde/Kolab/Session/Decorator/Logged.php | 10 +++++----- .../lib/Horde/Kolab/Session/Decorator/Stored.php | 10 +++++----- .../lib/Horde/Kolab/Session/Storage/Interface.php | 2 +- .../lib/Horde/Kolab/Session/Storage/Mock.php | 4 ++-- .../Horde/Kolab/Session/Storage/Sessionobjects.php | 4 ++-- .../lib/Horde/Kolab/Session/Valid/Base.php | 10 +++++----- .../Horde/Kolab/Session/Valid/Decorator/Logged.php | 2 +- .../lib/Horde/Kolab/Session/Valid/Interface.php | 2 +- framework/Kolab_Session/package.xml | 4 ++-- .../Session/Class/Decorator/AnonymousTest.php | 22 +++++++++++----------- .../Kolab/Session/Class/Decorator/LoggedTest.php | 22 +++++++++++----------- .../Kolab/Session/Class/Decorator/StoredTest.php | 22 +++++++++++----------- .../Horde/Kolab/Session/Class/Storage/MockTest.php | 2 +- .../Session/Class/Storage/SessionobjectsTest.php | 4 ++-- .../Horde/Kolab/Session/Class/Valid/BaseTest.php | 12 ++++++------ .../Session/Class/Valid/Decorator/LoggedTest.php | 2 +- 23 files changed, 93 insertions(+), 93 deletions(-) rename framework/Kolab_Session/lib/Horde/Kolab/{Session/Interface.php => Session.php} (98%) diff --git a/framework/Auth/lib/Horde/Auth/Kolab.php b/framework/Auth/lib/Horde/Auth/Kolab.php index 8f60222d9..9d3a0940b 100644 --- a/framework/Auth/lib/Horde/Auth/Kolab.php +++ b/framework/Auth/lib/Horde/Auth/Kolab.php @@ -19,7 +19,7 @@ class Horde_Auth_Kolab extends Horde_Auth_Base /** * The session handler. * - * @var Horde_Kolab_Session_Interface + * @var Horde_Kolab_Session */ private $_session; @@ -48,11 +48,11 @@ class Horde_Auth_Kolab extends Horde_Auth_Base /** * Set the session handler. * - * @param Horde_Kolab_Session_Interface $session The session handler. + * @param Horde_Kolab_Session $session The session handler. * * @return NULL */ - public function setSession(Horde_Kolab_Session_Interface $session) + public function setSession(Horde_Kolab_Session $session) { $this->_session = $session; } @@ -72,7 +72,7 @@ class Horde_Auth_Kolab extends Horde_Auth_Base /** * Retrieve a connected kolab session. * - * @return Horde_Kolab_Session_Interface The connected session. + * @return Horde_Kolab_Session The connected session. * * @throws Horde_Kolab_Session_Exception */ diff --git a/framework/Auth/test/Horde/Auth/Kolab/Class/KolabTest.php b/framework/Auth/test/Horde/Auth/Kolab/Class/KolabTest.php index 7cd618b5a..c4078d254 100644 --- a/framework/Auth/test/Horde/Auth/Kolab/Class/KolabTest.php +++ b/framework/Auth/test/Horde/Auth/Kolab/Class/KolabTest.php @@ -34,7 +34,7 @@ class Horde_Auth_Kolab_Class_KolabTest extends PHPUnit_Framework_TestCase { public function setUp() { - $this->session = $this->getMock('Horde_Kolab_Session_Interface'); + $this->session = $this->getMock('Horde_Kolab_Session'); $this->factory = $this->getMock('Horde_Kolab_Session_Factory_Interface'); if (!defined('HORDE_BASE')) { @@ -53,7 +53,7 @@ class Horde_Auth_Kolab_Class_KolabTest extends PHPUnit_Framework_TestCase $auth = new Horde_Auth_Kolab(); $auth->setSession($this->session); $this->assertType( - 'Horde_Kolab_Session_Interface', + 'Horde_Kolab_Session', $auth->getSession('user', array('password' => 'test')) ); } @@ -67,7 +67,7 @@ class Horde_Auth_Kolab_Class_KolabTest extends PHPUnit_Framework_TestCase ->with('user', array('password' => 'test')) ->will($this->returnValue($this->session)); $this->assertType( - 'Horde_Kolab_Session_Interface', + 'Horde_Kolab_Session', $auth->getSession('user', array('password' => 'test')) ); } diff --git a/framework/Core/lib/Horde/Core/Factory/KolabSession.php b/framework/Core/lib/Horde/Core/Factory/KolabSession.php index 2b96ad313..85ba2e0bf 100644 --- a/framework/Core/lib/Horde/Core/Factory/KolabSession.php +++ b/framework/Core/lib/Horde/Core/Factory/KolabSession.php @@ -118,14 +118,14 @@ class Horde_Core_Factory_KolabSession /** * Return the session validation driver. * - * @param Horde_Kolab_Session_Interface $session The session to validate. + * @param Horde_Kolab_Session $session The session to validate. * @param Horde_Kolab_Session_Auth_Interface $auth The auth handler. * * @return Horde_Kolab_Session_Valid_Interface The driver for validating * sessions. */ public function getSessionValidator( - Horde_Kolab_Session_Interface $session, + Horde_Kolab_Session $session, Horde_Kolab_Session_Auth_Interface $auth ) { $configuration = $this->_injector->getInstance('Horde_Kolab_Session_Configuration'); @@ -146,12 +146,12 @@ class Horde_Core_Factory_KolabSession /** * Validate the given session. * - * @param Horde_Kolab_Session_Interface $session The session to validate. + * @param Horde_Kolab_Session $session The session to validate. * * @return boolean True if the given session is valid. */ public function validate( - Horde_Kolab_Session_Interface $session + Horde_Kolab_Session $session ) { return $this->getSessionValidator( $session, diff --git a/framework/Core/test/Horde/Core/Factory/KolabSessionTest.php b/framework/Core/test/Horde/Core/Factory/KolabSessionTest.php index ae0a92132..08f79f988 100644 --- a/framework/Core/test/Horde/Core/Factory/KolabSessionTest.php +++ b/framework/Core/test/Horde/Core/Factory/KolabSessionTest.php @@ -47,7 +47,7 @@ class Horde_Core_Factory_KolabSessionTest extends PHPUnit_Framework_TestCase public function testMethodGetvalidatorHasResultHordekolabsessionvalid() { - $session = $this->getMock('Horde_Kolab_Session_Interface'); + $session = $this->getMock('Horde_Kolab_Session'); $this->assertType( 'Horde_Kolab_Session_Valid_Interface', $this->_getFactory()->getSessionValidator($session, $this->session_auth) @@ -60,7 +60,7 @@ class Horde_Core_Factory_KolabSessionTest extends PHPUnit_Framework_TestCase $this->session_auth->expects($this->once()) ->method('getCurrentUser') ->will($this->returnValue('mail@example.org')); - $session = $this->getMock('Horde_Kolab_Session_Interface'); + $session = $this->getMock('Horde_Kolab_Session'); $session->expects($this->once()) ->method('getMail') ->will($this->returnValue('mail@example.org')); @@ -75,7 +75,7 @@ class Horde_Core_Factory_KolabSessionTest extends PHPUnit_Framework_TestCase public function testMethodGetsessionHasResultHordekolabsessionTheOldSessionIfAnOldSessionWasStoredAndValid() { $factory = $this->_getFactory(); - $session = $this->getMock('Horde_Kolab_Session_Interface'); + $session = $this->getMock('Horde_Kolab_Session'); $session->expects($this->once()) ->method('getMail') ->will($this->returnValue('mail@example.org')); @@ -91,7 +91,7 @@ class Horde_Core_Factory_KolabSessionTest extends PHPUnit_Framework_TestCase public function testMethodGetsessionHasResultHordekolabsessionANewSessionIfAnOldSessionWasStoredAndInvalid() { $factory = $this->_getFactory(); - $session = $this->getMock('Horde_Kolab_Session_Interface'); + $session = $this->getMock('Horde_Kolab_Session'); $session->expects($this->once()) ->method('getMail') ->will($this->returnValue('mail@example.org')); @@ -110,7 +110,7 @@ class Horde_Core_Factory_KolabSessionTest extends PHPUnit_Framework_TestCase $this->session_storage->expects($this->once()) ->method('load') ->will($this->returnValue(false)); - $this->assertType('Horde_Kolab_Session_Interface', $factory->getSession()); + $this->assertType('Horde_Kolab_Session', $factory->getSession()); } @@ -135,7 +135,7 @@ class Horde_Core_Factory_KolabSessionTest extends PHPUnit_Framework_TestCase public function testMethodGetsessionvalidatorHasResultHordekolabsessionvalidloggedIfConfiguredThatWay() { - $session = $this->getMock('Horde_Kolab_Session_Interface'); + $session = $this->getMock('Horde_Kolab_Session'); $auth = $this->getMock('Horde_Kolab_Session_Auth_Interface'); $GLOBALS['conf']['kolab']['session']['log'] = true; $this->assertType( diff --git a/framework/Kolab_Session/lib/Horde/Kolab/Session/Interface.php b/framework/Kolab_Session/lib/Horde/Kolab/Session.php similarity index 98% rename from framework/Kolab_Session/lib/Horde/Kolab/Session/Interface.php rename to framework/Kolab_Session/lib/Horde/Kolab/Session.php index 3ece671c5..9485f7d4b 100644 --- a/framework/Kolab_Session/lib/Horde/Kolab/Session/Interface.php +++ b/framework/Kolab_Session/lib/Horde/Kolab/Session.php @@ -35,7 +35,7 @@ * @license http://www.fsf.org/copyleft/lgpl.html LGPL * @link http://pear.horde.org/index.php?package=Kolab_Session */ -interface Horde_Kolab_Session_Interface +interface Horde_Kolab_Session { /** * Try to connect the session handler. diff --git a/framework/Kolab_Session/lib/Horde/Kolab/Session/Base.php b/framework/Kolab_Session/lib/Horde/Kolab/Session/Base.php index 66d5e88a2..ca5e0fcdc 100644 --- a/framework/Kolab_Session/lib/Horde/Kolab/Session/Base.php +++ b/framework/Kolab_Session/lib/Horde/Kolab/Session/Base.php @@ -31,7 +31,7 @@ * @license http://www.fsf.org/copyleft/lgpl.html LGPL * @link http://pear.horde.org/index.php?package=Kolab_Session */ -class Horde_Kolab_Session_Base implements Horde_Kolab_Session_Interface +class Horde_Kolab_Session_Base implements Horde_Kolab_Session { /** * Kolab configuration parameters. diff --git a/framework/Kolab_Session/lib/Horde/Kolab/Session/Decorator/Anonymous.php b/framework/Kolab_Session/lib/Horde/Kolab/Session/Decorator/Anonymous.php index a1d389b27..06c5d36c9 100644 --- a/framework/Kolab_Session/lib/Horde/Kolab/Session/Decorator/Anonymous.php +++ b/framework/Kolab_Session/lib/Horde/Kolab/Session/Decorator/Anonymous.php @@ -34,12 +34,12 @@ * @link http://pear.horde.org/index.php?package=Kolab_Session */ class Horde_Kolab_Session_Decorator_Anonymous -implements Horde_Kolab_Session_Interface +implements Horde_Kolab_Session { /** * The session handler this instance provides with anonymous access. * - * @var Horde_Kolab_Session_Interface + * @var Horde_Kolab_Session */ private $_session; @@ -60,13 +60,13 @@ implements Horde_Kolab_Session_Interface /** * Constructor. * - * @param Horde_Kolab_Session_Interface $session The this instance should provide - * anonymous access for. - * @param string $user ID of the anonymous user. - * @param string $pass Password of the anonymous user. + * @param Horde_Kolab_Session $session The this instance should provide + * anonymous access for. + * @param string $user ID of the anonymous user. + * @param string $pass Password of the anonymous user. */ public function __construct( - Horde_Kolab_Session_Interface $session, + Horde_Kolab_Session $session, $user, $pass ) { diff --git a/framework/Kolab_Session/lib/Horde/Kolab/Session/Decorator/Logged.php b/framework/Kolab_Session/lib/Horde/Kolab/Session/Decorator/Logged.php index 9fa045a5a..a2a2fb55f 100644 --- a/framework/Kolab_Session/lib/Horde/Kolab/Session/Decorator/Logged.php +++ b/framework/Kolab_Session/lib/Horde/Kolab/Session/Decorator/Logged.php @@ -26,12 +26,12 @@ * @link http://pear.horde.org/index.php?package=Kolab_Session */ class Horde_Kolab_Session_Decorator_Logged -implements Horde_Kolab_Session_Interface +implements Horde_Kolab_Session { /** * The session handler. * - * @var Horde_Kolab_Session_Interface + * @var Horde_Kolab_Session */ private $_session; @@ -48,11 +48,11 @@ implements Horde_Kolab_Session_Interface * The provided logger class needs to implement the methods info() and * err(). * - * @param Horde_Kolab_Session_Interface $session The session handler. - * @param mixed $logger The logger instance. + * @param Horde_Kolab_Session $session The session handler. + * @param mixed $logger The logger instance. */ public function __construct( - Horde_Kolab_Session_Interface $session, + Horde_Kolab_Session $session, $logger ) { $this->_session = $session; diff --git a/framework/Kolab_Session/lib/Horde/Kolab/Session/Decorator/Stored.php b/framework/Kolab_Session/lib/Horde/Kolab/Session/Decorator/Stored.php index 55c128692..b9d7c5e7d 100644 --- a/framework/Kolab_Session/lib/Horde/Kolab/Session/Decorator/Stored.php +++ b/framework/Kolab_Session/lib/Horde/Kolab/Session/Decorator/Stored.php @@ -26,12 +26,12 @@ * @link http://pear.horde.org/index.php?package=Kolab_Session */ class Horde_Kolab_Session_Decorator_Stored -implements Horde_Kolab_Session_Interface +implements Horde_Kolab_Session { /** * The session handler. * - * @var Horde_Kolab_Session_Interface + * @var Horde_Kolab_Session */ private $_session; @@ -52,11 +52,11 @@ implements Horde_Kolab_Session_Interface /** * Constructor. * - * @param Horde_Kolab_Session_Interface $session The session handler. - * @param Horde_Kolab_Session_Storage $storage Store the session here. + * @param Horde_Kolab_Session $session The session handler. + * @param Horde_Kolab_Session_Storage $storage Store the session here. */ public function __construct( - Horde_Kolab_Session_Interface $session, + Horde_Kolab_Session $session, Horde_Kolab_Session_Storage_Interface $storage ) { $this->_session = $session; diff --git a/framework/Kolab_Session/lib/Horde/Kolab/Session/Storage/Interface.php b/framework/Kolab_Session/lib/Horde/Kolab/Session/Storage/Interface.php index 1c4a74556..e27adb092 100644 --- a/framework/Kolab_Session/lib/Horde/Kolab/Session/Storage/Interface.php +++ b/framework/Kolab_Session/lib/Horde/Kolab/Session/Storage/Interface.php @@ -42,5 +42,5 @@ interface Horde_Kolab_Session_Storage_Interface * * @return NULL */ - public function save(Horde_Kolab_Session_Interface $session); + public function save(Horde_Kolab_Session $session); } diff --git a/framework/Kolab_Session/lib/Horde/Kolab/Session/Storage/Mock.php b/framework/Kolab_Session/lib/Horde/Kolab/Session/Storage/Mock.php index 68985e607..bdaea3f93 100644 --- a/framework/Kolab_Session/lib/Horde/Kolab/Session/Storage/Mock.php +++ b/framework/Kolab_Session/lib/Horde/Kolab/Session/Storage/Mock.php @@ -47,11 +47,11 @@ implements Horde_Kolab_Session_Storage_Interface /** * Save the session information. * - * @param Horde_Kolab_Session_Interface $session The session information. + * @param Horde_Kolab_Session $session The session information. * * @return NULL */ - public function save(Horde_Kolab_Session_Interface $session) + public function save(Horde_Kolab_Session $session) { $this->session = $session; } diff --git a/framework/Kolab_Session/lib/Horde/Kolab/Session/Storage/Sessionobjects.php b/framework/Kolab_Session/lib/Horde/Kolab/Session/Storage/Sessionobjects.php index 57c7fc958..80b79cf21 100644 --- a/framework/Kolab_Session/lib/Horde/Kolab/Session/Storage/Sessionobjects.php +++ b/framework/Kolab_Session/lib/Horde/Kolab/Session/Storage/Sessionobjects.php @@ -59,11 +59,11 @@ implements Horde_Kolab_Session_Storage_Interface /** * Save the session information. * - * @param Horde_Kolab_Session_Interface $session The session information. + * @param Horde_Kolab_Session $session The session information. * * @return NULL */ - public function save(Horde_Kolab_Session_Interface $session) + public function save(Horde_Kolab_Session $session) { $this->_session_objects->overwrite('kolab_session', $session); } diff --git a/framework/Kolab_Session/lib/Horde/Kolab/Session/Valid/Base.php b/framework/Kolab_Session/lib/Horde/Kolab/Session/Valid/Base.php index dbe19de87..4b028c10e 100644 --- a/framework/Kolab_Session/lib/Horde/Kolab/Session/Valid/Base.php +++ b/framework/Kolab_Session/lib/Horde/Kolab/Session/Valid/Base.php @@ -37,7 +37,7 @@ implements Horde_Kolab_Session_Valid_Interface /** * The session handler this instance provides with anonymous access. * - * @var Horde_Kolab_Session_Interface + * @var Horde_Kolab_Session */ private $_session; @@ -51,12 +51,12 @@ implements Horde_Kolab_Session_Valid_Interface /** * Constructor. * - * @param Horde_Kolab_Session_Interface $session The session that should be - * validated. + * @param Horde_Kolab_Session $session The session that should be + * validated. * @param Horde_Kolab_Session_Auth_Interface $auth The authentication handler. */ public function __construct( - Horde_Kolab_Session_Interface $session, + Horde_Kolab_Session $session, Horde_Kolab_Session_Auth_Interface $auth ) { $this->_session = $session; @@ -90,7 +90,7 @@ implements Horde_Kolab_Session_Valid_Interface /** * Return the session this validator checks. * - * @return Horde_Kolab_Session_Interface The session checked by this + * @return Horde_Kolab_Session The session checked by this * validator. */ public function getSession() diff --git a/framework/Kolab_Session/lib/Horde/Kolab/Session/Valid/Decorator/Logged.php b/framework/Kolab_Session/lib/Horde/Kolab/Session/Valid/Decorator/Logged.php index 7baa9abc4..d30be051d 100644 --- a/framework/Kolab_Session/lib/Horde/Kolab/Session/Valid/Decorator/Logged.php +++ b/framework/Kolab_Session/lib/Horde/Kolab/Session/Valid/Decorator/Logged.php @@ -88,7 +88,7 @@ implements Horde_Kolab_Session_Valid_Interface /** * Return the session this validator checks. * - * @return Horde_Kolab_Session_Interface The session checked by this + * @return Horde_Kolab_Session The session checked by this * validator. */ public function getSession() diff --git a/framework/Kolab_Session/lib/Horde/Kolab/Session/Valid/Interface.php b/framework/Kolab_Session/lib/Horde/Kolab/Session/Valid/Interface.php index b8f03467c..723875240 100644 --- a/framework/Kolab_Session/lib/Horde/Kolab/Session/Valid/Interface.php +++ b/framework/Kolab_Session/lib/Horde/Kolab/Session/Valid/Interface.php @@ -47,7 +47,7 @@ interface Horde_Kolab_Session_Valid_Interface /** * Return the session this validator checks. * - * @return Horde_Kolab_Session_Interface The session checked by this + * @return Horde_Kolab_Session The session checked by this * validator. */ public function getSession(); diff --git a/framework/Kolab_Session/package.xml b/framework/Kolab_Session/package.xml index abfdcbb38..fa316b7ed 100644 --- a/framework/Kolab_Session/package.xml +++ b/framework/Kolab_Session/package.xml @@ -45,6 +45,7 @@ http://pear.php.net/dtd/package-2.0.xsd">