YSMWAppAction.class.php 2.58 KB
<?php
require_once dirname(__FILE__).'/../facade/YSMFAppFacade.class.php';
require_once dirname(__FILE__).'/common/YSMWBaseAction.class.php';
class YSMWAppAction extends YSMWBaseAction
{
    private $mAppFacade = null;
    
    /**
     * 初始化
     */
    public function __construct()
    {
        $this->mAppFacade = new YSMFAppFacade();
    }
    
    /**
     * 其它应用
     * 
     * @param array $request
     * @return html
     */
    public function getOtherClassPage($request)
    {
        $userID = $this->getUserID();
        $result = $this->mAppFacade->getOtherClassPage($userID, $request);
        return $result;
    }
    
    /**
     * 我的应用
     * 
     * @param array $request
     * @return html
     */
    public function getMyClassPage($request)
    {
        $userID = $this->getUserID();
        $result = $this->mAppFacade->getMyClassPage($userID, $request);
        return $result;
    }
    
    /**
     * 添加应用
     * 
     * @param $request
     * @return html
     */
    public function addApp($request)
    {
        $userID = $this->getUserID();
        $result = $this->mAppFacade->addApp($userID, $request);
        return $result;
    }
    
    /**
     * 显示应用信息
     * 
     * @param array $request
     * @return html
     */
    public function getAppInfo($request)
    {
        $userID = $this->getUserID();
        $result = $this->mAppFacade->getAppInfo($userID, $request);
        return $result;
    }
    
    /**
     * (non-PHPdoc)
     * @see mobile/BASE/web/common/YMWBaseAction#accessRule()
     */
    public function accessRule()
    {
        return array(
                        array(
                                 'allow',
                                 'actions' => array(
                                                       'getOtherClassPage',
                                                       'getMyClassPage',
                                                       'addApp',
                                                       'getAppInfo',
                                                   ),
                                 'users' => array('@'),
                             ),
                    );
    }

    /**
     * (non-PHPdoc)
     * @see YSMWBaseAction::optLoggerRule()
     */
    public function optLoggerRule()
    {
        return array(
                        'getOtherClassPage' => 'PS000101001',
                        'getMyClassPage' => 'PS000101002',
                        'addApp' => 'PS000101003',
                        'getAppInfo' => 'PS000101004',
                    );
    }
}
?>