Skip to content

Commit

Permalink
Implement #6: remove Zend_Session** class and use fproject\amf\sessio…
Browse files Browse the repository at this point in the history
…n\** classes instead
  • Loading branch information
Bui Sy Nguyen committed Jan 22, 2016
1 parent 3e7ce55 commit 23e91f0
Show file tree
Hide file tree
Showing 12 changed files with 1,114 additions and 446 deletions.
10 changes: 3 additions & 7 deletions fproject/Zend/Amf/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@
/** @see Zend_Amf_Parse_TypeLoader */
require_once 'Zend/Amf/Parse/TypeLoader.php';

/** @see Zend_Auth */
require_once 'Zend/Auth.php';

use fproject\amf\auth\AuthAbstract;

/**
Expand Down Expand Up @@ -213,7 +210,6 @@ public function isProduction()
*/
public function setSession($namespace = 'Zend_Amf')
{
require_once 'Zend/Session.php';
$this->_session = true;
return $this;
}
Expand Down Expand Up @@ -255,7 +251,7 @@ protected function _checkAcl($object, $function)
$class = null;
}

$auth = Zend_Auth::getInstance();
$auth = \fproject\amf\auth\Auth::getInstance();
if($auth->hasIdentity()) {
$role = $auth->getIdentity()->role;
} else {
Expand Down Expand Up @@ -407,7 +403,7 @@ protected function _loadCommandMessage(Zend_Amf_Value_Messaging_CommandMessage $
break;
case Zend_Amf_Value_Messaging_CommandMessage::LOGOUT_OPERATION :
if($this->_auth) {
Zend_Auth::getInstance()->clearIdentity();
\fproject\amf\auth\Auth::getInstance()->clearIdentity();
}
$return = new Zend_Amf_Value_Messaging_AcknowledgeMessage($message);
break;
Expand Down Expand Up @@ -466,7 +462,7 @@ protected function _handleAuth( $userId, $password)
return true;
}
$this->_auth->setCredentials($userId, $password);
$auth = Zend_Auth::getInstance();
$auth = \fproject\amf\auth\Auth::getInstance();
$result = $auth->authenticate($this->_auth);
if ($result->isValid()) {
if (!$this->isSession()) {
Expand Down
43 changes: 0 additions & 43 deletions fproject/Zend/Loader/Autoloader/Interface.php

This file was deleted.

74 changes: 0 additions & 74 deletions fproject/Zend/Session/Exception.php

This file was deleted.

81 changes: 0 additions & 81 deletions fproject/Zend/Session/SaveHandler/Interface.php

This file was deleted.

52 changes: 0 additions & 52 deletions fproject/Zend/Session/Validator/Interface.php

This file was deleted.

Loading

0 comments on commit 23e91f0

Please sign in to comment.