当前位置: 首页>>代码示例>>PHP>>正文


PHP Base_Controller::Base_Controller方法代码示例

本文整理汇总了PHP中Base_Controller::Base_Controller方法的典型用法代码示例。如果您正苦于以下问题:PHP Base_Controller::Base_Controller方法的具体用法?PHP Base_Controller::Base_Controller怎么用?PHP Base_Controller::Base_Controller使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Base_Controller的用法示例。


在下文中一共展示了Base_Controller::Base_Controller方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Member

 function Member()
 {
     parent::Base_Controller();
     $this->email = $this->_Authentication();
     if (empty($this->subdomain)) {
         exit('This controller is only for subdomains.');
     }
     // This controller is only for subdomains.
     if (!$this->isOwnerOfSite() && !$this->isMemberOfSite() && $this->uri->segment(2) != 'create') {
         exit('You cannot access this controller.');
     }
     // Only members and owner can access this controller.
     $this->userSettings = $userSettings = $this->User_is_member_of_site_model->getWhere(array('user_id' => $this->getUserId(), 'site_id' => $this->subdomainId), 1);
     if (!empty($userSettings)) {
         if ($userSettings[0]['facebook_pics_y_n'] == 1 || $userSettings[0]['facebook_vids_y_n'] == 1) {
             $this->facebook = new Facebook($this->facebookApiKey, $this->facebookAppSecret);
             try {
                 $this->fbUserId = $this->facebook->api_client->users_getLoggedInUser();
                 $this->facebook->require_login();
                 //$facebook->require_frame();
             } catch (Exception $ex) {
                 // user needs to link with facebook
                 $this->flashMsg = "You need to link with Facebook. <a href='http://" . $_SERVER['HTTP_HOST'] . "/member/settings/'>Go to settings and link.</a>";
             }
         }
     }
     $this->isSiteOwner = $this->isOwnerOfSite();
     //print "<pre>"; var_dump($this->facebook->api_client->users_getLoggedInUser()); print "</pre>";
     //print "<pre>"; var_dump($this->fbUserId); print "</pre>";
     /*var_dump($this->subdomain);
     		var_dump($this->subdomainId);
     		var_dump($this->isMemberOfSite());*/
 }
开发者ID:ki8asui,项目名称:isography,代码行数:33,代码来源:member.php

示例2: __construct

 public function __construct()
 {
     parent::Base_Controller();
     $this->paymentsProcessHelper = new PaymentsProcessHelper($this);
     $this->doctrine = new DoctrineHelper($this);
     $this->log = \Logger::getLogger(paymentsProcessingLogger);
 }
开发者ID:panelo,项目名称:SampleCodes,代码行数:7,代码来源:SamplePaymentProcessingController.php

示例3: Welcome

 function Welcome()
 {
     parent::Base_Controller();
     $this->_Authentication();
     if (!empty($this->username) && !empty($this->subdomain)) {
         redirect('http://' . $_SERVER['HTTP_HOST'] . '/member');
     }
     //if logged in redirect to activity
 }
开发者ID:ki8asui,项目名称:isography,代码行数:9,代码来源:welcome.php

示例4: Fbmember

 function Fbmember()
 {
     parent::Base_Controller();
     //$this->subdomain = 'x';
     //$_sitedata = $this->Site_model->getWhere('subdomain = '.$this->subdomain,1);
     //$this->subdomainId = $_sitedata[0]['id'];
     //$this->facebook = new Facebook($this->facebookApiKey,$this->facebookAppSecret);
     //$this->fbUserId = $this->facebook->api_client->users_getLoggedInUser();
     //$_userdata = $this->User_model->getWhere('fb_user_id = '.$this->fbUserId,1);
     //check userdata, if zero - there is no user with such facebookid - so, this user not linked with facebook
     //$this->userSettings = $userSettings = $this->User_is_member_of_site_model->getWhere(array('user_id' => $_userdata[0]['id'], 'site_id' => $this->subdomainId), 1);
 }
开发者ID:ki8asui,项目名称:isography,代码行数:12,代码来源:fbmember.php

示例5: Site

 function Site()
 {
     parent::Base_Controller();
 }
开发者ID:ki8asui,项目名称:isography,代码行数:4,代码来源:site.php

示例6:

 function __construct()
 {
     parent::Base_Controller(FALSE);
     $this->em =& get_em_instance();
     $this->load->helper('file');
 }
开发者ID:panelo,项目名称:SampleCodes,代码行数:6,代码来源:SampleBarcodereaderController.php

示例7: Signin

 function Signin()
 {
     parent::Base_Controller();
 }
开发者ID:ki8asui,项目名称:isography,代码行数:4,代码来源:signin.php

示例8:

 function Fbconnect_test()
 {
     parent::Base_Controller();
 }
开发者ID:ki8asui,项目名称:isography,代码行数:4,代码来源:fbconnect_test.php


注:本文中的Base_Controller::Base_Controller方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。