Esempio n. 1
0
 /**
  * The constructer
  */
 public function __construct($kid = '')
 {
     if (!isset($this->db)) {
         $this->db = parent::getInstance();
     }
     if (!empty($kid)) {
         $this->kid = $kid;
         $this->get();
     }
 }
Esempio n. 2
0
 /**
  * The constructer
  */
 public function __construct($fid = '')
 {
     if (!isset($this->db)) {
         $this->db = parent::getInstance();
     }
     if (!empty($fid)) {
         $this->fid = $fid;
         //try to get data from memcache
         $this->cache = parent::memcache_connect();
         if ($this->cache->get("Firma_Table" . $fid)) {
             foreach ($this->cache->get("Firma_Table" . $fid) as $key => $value) {
                 $this->{$key} = $value;
             }
             if (!isset($this->db)) {
                 $this->db = parent::getInstance();
             }
             return;
         }
         $this->get();
         unset($this->db);
         $this->cache->set("Firma_Table" . $fid, $this);
         $this->db = parent::getInstance();
     }
 }