示例#1
0
 public function __construct()
 {
     parent::__construct();
     $this->config->load('smarty.php');
     $this->compile_dir = $this->config->item('smarty', 'compile_dir') ?: APPPATH . 'var/template_c';
     $this->template_dir = $this->config->item('smarty', 'template_dir') ?: APPPATH . 'views/templates';
     $this->_wrap = $this->config->item('smarty', 'wrap') ?: false;
     $this->_ext_vars = array();
     // Test the compiled templates directory, create if necessary
     file_exists($this->compile_dir) or mkdir($this->compile_dir, DIR_WRITE_MODE, true);
     // Test the template directory
     if (!is_dir($this->template_dir)) {
         Exception::error('Template directory does not exist');
     }
     // Assign some common variable to smarty
     $this->_smarty = new BaseSmartyWHMCS();
     // WHMCS version of smarty
     $this->_smarty->caching = $this->config->item('smarty', 'caching') ?: 0;
     $this->_smarty->debugging = $this->config->item('smarty', 'debugging') ?: true;
     $this->_smarty->compile_dir = $this->compile_dir;
     $this->_smarty->template_dir = $this->template_dir;
     $this->_smarty->assign('APPPATH', APPPATH);
     $this->_smarty->assign('BASEPATH', BASEPATH);
     $this->log->write('debug', "Smarty Class Initialized");
 }
示例#2
0
 public function __construct()
 {
     parent::__construct();
     $this->_config = $this->config->item('site', 'assets', 'less');
     $this->_less = new \lessc();
     $this->_lock = APPPATH . 'tmp/lessphp.lock';
     if (!file_exists($this->_lock)) {
         touch($this->_lock);
     }
 }
示例#3
0
 public function __construct()
 {
     parent::__construct();
     $this->config->load('view.php');
     $this->template_dir = $this->config->item('view', 'template_dir') ?: APPPATH . 'views/templates';
     $this->_wrap = $this->config->item('view', 'wrap') ?: false;
     $this->_ext_vars = array();
     // Test the template directory
     if (!is_dir($this->template_dir)) {
         Exception::error('Template directory does not exist');
     }
 }
示例#4
0
 public function __construct($access_token = '', $access_token_secret = '')
 {
     parent::__construct();
     $this->input->config->load('social');
     $this->_client = new \Google_Client();
     $this->_client->setApplicationName('Fluenz');
     $this->_client->setClientId($this->config->item('social', 'google', 'client-id'));
     $this->_client->setClientSecret($this->config->item('social', 'google', 'client-secret'));
     $this->_client->setAccessType('offline');
     $this->_client->setApprovalPrompt('force');
     $this->_client->addScope(array(\Google_Service_YouTube::YOUTUBE_READONLY, \Google_Service_Analytics::ANALYTICS_READONLY, \Google_Service_Plus::USERINFO_PROFILE));
 }
示例#5
0
 public function __construct($access_token = '', $access_token_secret = '')
 {
     parent::__construct();
     $this->input->config->load('social');
     $this->_lib = new \tmhOAuth(array('consumer_key' => $this->config->item('social', 'twitter', 'consumer-key'), 'consumer_secret' => $this->config->item('social', 'twitter', 'consumer-secret'), 'token' => $access_token, 'secret' => $access_token_secret));
     /*
     if ($access_token)
     {
     	$this->_lib->config(array(
     		'token' => $access_token['token'],
     		'secret' => $access_token['secret'],
     	));
     }
     */
 }
示例#6
0
 public function __construct($access_token = null, $is_page = false)
 {
     parent::__construct();
     $this->input->config->load('social');
     FacebookSession::setDefaultApplication($this->config->item('social', 'facebook', 'app-id'), $this->config->item('social', 'facebook', 'app-secret'));
     if ($access_token !== null) {
         if (!(new FacebookSession($access_token))->getAccessToken()->isValid()) {
             throw new FacebookAccessTokenException('Token is not valid anymore.');
         }
         /*
         if ( ! $is_page)
         {
         	try {
         		$code = AccessToken::getCodeFromAccessToken($access_token);
         		$access_token = AccessToken::getAccessTokenFromCode($code);
         	} catch(\Exception $e) {
         		throw new FacebookAccessTokenException('Unable to obtain fresh access token.');
         	}
         }
         */
         $this->_session = new FacebookSession($access_token);
     }
 }
示例#7
0
 public function __construct($username, $password)
 {
     parent::__construct();
     $this->_username = $username;
     $this->_password = $password;
 }
 public function __construct()
 {
     parent::__construct();
 }
示例#9
0
 public function __construct()
 {
     parent::__construct();
     require_once BASEPATH . 'thirdparty/codeigniter/Email.php';
     $this->_init();
 }
示例#10
0
 public function __construct()
 {
     parent::__construct();
     $this->input->config->load('social');
     $this->_key = $this->config->item('social', 'klout', 'api-key');
 }
示例#11
0
 public function __construct($access_token = '', $access_token_secret = '')
 {
     parent::__construct();
     $this->input->config->load('social');
     $this->_lib = new Instagram(array('apiKey' => $this->config->item('social', 'instagram', 'client-id'), 'apiSecret' => $this->config->item('social', 'instagram', 'client-secret'), 'apiCallback' => ''));
 }