Esempio n. 1
0
 public function addUser()
 {
     unser($this->loginUrl);
     $this->db->set($this);
     $this->db->insert("user");
     $insert_id = $this->db->insert_id();
     return $insert_id;
 }
Esempio n. 2
0
 public function __construct()
 {
     $url = $this->parseUrl();
     if (file_exists('../app/controllers/' . $url[0] . '.php')) {
         $this->controller = $url[0];
         unser($url[0]);
     }
     require_once '../app/controllers/' . $this->controller . 'php';
     if (isset($url[1])) {
         if (method_exists($this->controller, $url[1])) {
             $this->method = $url[1];
             unset($url[1]);
         }
     }
     $this->params = $url ? array_values($url) : [];
     call_user_func_array([$this->controller, $this->method, $this->params]);
 }
Esempio n. 3
0
 /**
  * Remove a request cookie by name or all cookies.
  *
  * @param  string|true         $name True to remove all cookies.
  * @return ChipVN_Http_Client
  */
 public function removeCookies($name)
 {
     if ($name === true) {
         $this->cookies = array();
     } else {
         unser($this->cookies[$name]);
     }
     return $this;
 }