本文整理汇总了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());*/
}
示例2: __construct
public function __construct()
{
parent::Base_Controller();
$this->paymentsProcessHelper = new PaymentsProcessHelper($this);
$this->doctrine = new DoctrineHelper($this);
$this->log = \Logger::getLogger(paymentsProcessingLogger);
}
示例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
}
示例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);
}
示例5: Site
function Site()
{
parent::Base_Controller();
}
示例6:
function __construct()
{
parent::Base_Controller(FALSE);
$this->em =& get_em_instance();
$this->load->helper('file');
}
示例7: Signin
function Signin()
{
parent::Base_Controller();
}
示例8:
function Fbconnect_test()
{
parent::Base_Controller();
}