當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。