Example #1
0
 /**
  * @param array $config
  * @return bool
  */
 public function setup($config)
 {
     $this->conf['key'] = $config['key'];
     $this->conf['secret'] = $config['secret'];
     $this->conf['token'] = $config['token'];
     $this->conf['token_secret'] = $config['token_secret'];
     return $this->update_config('twitter', $this->conf->getArrayCopy());
 }
Example #2
0
 /**
  * @param null $token
  * @param null $user_id
  * @param null $expires
  * @return mixed|null
  */
 public function access_token($token = null, $user_id = null, $expires = null)
 {
     if (is_null($token)) {
         return $this->conf->get('token');
     }
     $this->conf['token'] = $token;
     $this->conf['user_id'] = $user_id;
     $this->conf['expires'] = $expires > 0 ? time() + $expires : 0;
     return $this->update_config('vkontakte', $this->conf->getArrayCopy());
 }
Example #3
0
 /**
  * @return bool
  */
 public function save()
 {
     return $this->update_config('application', $this->conf->getArrayCopy());
 }
Example #4
0
 /**
  * @return array
  */
 public function social_list()
 {
     return $this->conf->getArrayCopy();
 }
Example #5
0
 /**
  * @param array $config
  * @return bool
  */
 public function setup($config)
 {
     $opt = new Options($config);
     $this->conf['id'] = $opt->get('id');
     return $this->update_config('ga', $this->conf->getArrayCopy());
 }
Example #6
0
 /**
  * @return bool
  */
 public function save()
 {
     return $this->update_config('permissions', $this->map->getArrayCopy());
 }