コード例 #1
0
ファイル: ApiOperation.php プロジェクト: gudwin/extasy
 /**
  * @return mixed|void
  * @throws \ForbiddenException
  */
 public function exec()
 {
     if (UsersLogin::isLogined()) {
         $this->userSession = UsersLogin::getCurrentSession();
         return parent::exec();
     } else {
         throw new ForbiddenException('Need active session');
     }
 }
コード例 #2
0
ファイル: ApiOperationTest.php プロジェクト: gudwin/extasy
 /**
  * @expectedException \Extasy\Api\Exception
  */
 public function testSetWrongCallback()
 {
     $method = new ApiOperation();
     $method->setCallback('unknownFunc');
 }
コード例 #3
0
ファイル: ApiOperation.php プロジェクト: gudwin/extasy
 public function __construct($data = array())
 {
     parent::__construct($data);
     $this->requiredACLRights = array(self::RightName);
 }