/** * @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()); }
/** * @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()); }
/** * @return bool */ public function save() { return $this->update_config('application', $this->conf->getArrayCopy()); }
/** * @return array */ public function social_list() { return $this->conf->getArrayCopy(); }
/** * @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()); }
/** * @return bool */ public function save() { return $this->update_config('permissions', $this->map->getArrayCopy()); }