diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-07-20 10:39:01 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-07-20 10:39:01 +0400 |
commit | e492c76009ea81c9513ae359f5fd41e84703116f (patch) | |
tree | 67b0f9006616d5f093447af6f5646c66b5e56ff8 /core/Auth.php | |
parent | e79675330823b957fe9f8ffa462ad5317c14dbc9 (diff) |
Adding Logic for namespaces in Loader.php + Fixing build
Converting Access & Auth to namespace
Diffstat (limited to 'core/Auth.php')
-rw-r--r-- | core/Auth.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/core/Auth.php b/core/Auth.php index 252a31afbd..67edbbabaf 100644 --- a/core/Auth.php +++ b/core/Auth.php @@ -9,13 +9,15 @@ * @package Piwik */ +namespace Piwik; + /** * Interface for authentication modules * * @package Piwik * @subpackage Piwik_Auth */ -interface Piwik_Auth +interface Auth { /** * Authentication module's name, e.g., "Login" @@ -27,7 +29,7 @@ interface Piwik_Auth /** * Authenticates user * - * @return Piwik_Auth_Result + * @return AuthResult */ public function authenticate(); } @@ -37,10 +39,10 @@ interface Piwik_Auth * * @package Piwik * @subpackage Piwik_Auth - * @see Zend_Auth_Result, libs/Zend/Auth/Result.php + * @see Zend_AuthResult, libs/Zend/Auth/Result.php * @link http://framework.zend.com/manual/en/zend.auth.html */ -class Piwik_Auth_Result extends Zend_Auth_Result +class AuthResult extends \Zend_Auth_Result { /** * token_auth parameter used to authenticate in the API @@ -52,7 +54,7 @@ class Piwik_Auth_Result extends Zend_Auth_Result const SUCCESS_SUPERUSER_AUTH_CODE = 42; /** - * Constructor for Piwik_Auth_Result + * Constructor for AuthResult * * @param int $code * @param string $login identity @@ -61,7 +63,7 @@ class Piwik_Auth_Result extends Zend_Auth_Result */ public function __construct($code, $login, $token_auth, array $messages = array()) { - // Piwik_Auth_Result::SUCCESS_SUPERUSER_AUTH_CODE, Piwik_Auth_Result::SUCCESS, Piwik_Auth_Result::FAILURE + // AuthResult::SUCCESS_SUPERUSER_AUTH_CODE, AuthResult::SUCCESS, AuthResult::FAILURE $this->_code = (int)$code; $this->_identity = $login; $this->_messages = $messages; |