__construct() public method

构造函数,默认用户设为anonymous
public __construct ( )
 public function __construct($record = null, $isSingleton = false)
 {
     parent::__construct($record, $isSingleton);
     // we're explicitly setting our ID to -1. This is detected by the
     // permission service management code for public permission application
     $this->ID = -1;
 }
Beispiel #2
0
 public function __construct()
 {
     parent::__construct();
     $this->isLogin();
     //登录验证
     $this->memberdata = $this->model($this->membermodel[$this->memberinfo['modelid']]['tablename']);
     $this->view->assign('navigation', array('edit' => array('name' => lang('m-inf-0'), 'url' => url('member/info/edit')), 'avatar' => array('name' => lang('m-inf-1'), 'url' => url('member/info/avatar')), 'password' => array('name' => lang('m-inf-2'), 'url' => url('member/info/password')), 'oauth' => array('name' => lang('m-inf-3'), 'url' => url('member/info/oauth')), 'favorite' => array('name' => lang('m-inf-4'), 'url' => url('member/info/favorite'))));
 }
Beispiel #3
0
 public function __construct()
 {
     parent::__construct();
     $this->isLogin();
     //登录验证
     if (!$this->memberinfo['status']) {
         $this->memberMsg(lang('m-con-0'));
     }
     //判断审核
     $this->nav = $navigation = array();
     $this->tree = $this->instance('tree');
     $this->form = $this->getFormMember();
     $this->group = $this->membergroup[$this->memberinfo['groupid']];
     $this->cmodel = $this->get_model();
     $this->emodel = $this->cache->get('model_member_extend');
     $this->tree->config(array('id' => 'catid', 'parent_id' => 'parentid', 'name' => 'catname'));
     if ($this->cmodel) {
         //内容模型菜单
         foreach ($this->cmodel as $t) {
             //投稿权限验证
             if ($this->memberPost($t['setting']['auth'])) {
                 continue;
             }
             $navigation[$t['modelid']] = array('name' => $t['modelname'], 'url' => url('member/content/', array('modelid' => $t['modelid'])));
             if (empty($this->nav)) {
                 $this->nav = url('member/content/', array('modelid' => $t['modelid']));
             }
         }
     }
     if ($this->form) {
         //表单模型菜单
         foreach ($this->form as $t) {
             $navigation[$t['tablename']] = array('name' => $t['joinname'] . $t['modelname'], 'url' => url('member/content/form', array('modelid' => $t['modelid'])));
             if (empty($this->nav)) {
                 $this->nav = url('member/content/form', array('modelid' => $t['modelid']));
             }
         }
     }
     if ($this->emodel) {
         //会员扩展模型菜单
         foreach ($this->emodel as $t) {
             //管理权限或者投稿权限验证
             if (!$t['setting']['member']['admin'] && $this->memberPost($t['setting']['auth'])) {
                 continue;
             }
             $navigation[$t['modelid']] = array('name' => $t['modelname'], 'url' => url('member/content/extend', array('modelid' => $t['modelid'])));
             if (empty($this->nav)) {
                 $this->nav = url('member/content/extend', array('modelid' => $t['modelid']));
             }
         }
     }
     $navigation['verify'] = array('name' => lang('a-mod-137'), 'url' => url('member/content/verify'));
     $navigation['attachment'] = array('name' => lang('m-con-5'), 'url' => url('member/content/attachment'));
     if (empty($this->nav)) {
         $this->nav = url('member/content/verify');
     }
     $this->view->assign('navigation', $navigation);
 }
Beispiel #4
0
 public function __construct()
 {
     parent::__construct();
     $model = $this->cache->get('model_member_extend');
     $this->modelid = (int) $this->get('modelid');
     $this->model = $model[$this->modelid];
     $this->touserid = (int) $this->get('touserid');
     if (empty($this->model)) {
         $this->msg(lang('a-mod-4'));
     }
     $this->table = $this->model($model[$this->modelid]['tablename']);
 }
Beispiel #5
0
 public function __construct()
 {
     parent::__construct();
     $this->isLogin();
     //登录验证//判断审核
     if (!$this->memberinfo['status']) {
         $this->memberMsg(lang('m-con-0'));
     }
     $this->pms = $this->model('member_pms');
     $inbox = $this->pms->count('member_pms', 'id', 'hasview=0 AND toid=' . $this->memberinfo['id']);
     //未读收件箱短信条数
     $this->view->assign('navigation', array('send' => array('name' => lang('m-pms-0'), 'url' => url('member/pms/send')), 'inbox' => array('name' => lang('m-pms-1'), 'url' => url('member/pms/inbox')), 'outbox' => array('name' => lang('m-pms-2'), 'url' => url('member/pms/outbox'))));
     $this->view->assign('inbox', $inbox);
 }
 public function __construct()
 {
     parent::__construct();
 }
Beispiel #7
0
 /**
  * Creates a new routine
  *
  * @param  lang.mirrors.TypeMirror $mirror
  * @param  php.ReflectionMethod $reflect
  */
 public function __construct($mirror, $reflect)
 {
     parent::__construct($mirror, $reflect);
     $this->parameters = new Parameters($this, $reflect);
 }
Beispiel #8
0
 public function __construct(Evolution $evolution)
 {
     parent::__construct($evolution);
     $this->setGeneSize($this->getSudokuSize4());
 }
Beispiel #9
0
 public function __construct(Evolution $evolution)
 {
     parent::__construct($evolution);
     $geneSize = strlen($evolution->getTarget());
     $this->setGeneSize($geneSize);
 }