Esempio n. 1
0
 protected function getMemCacheConfig()
 {
     $mecacheConfig = new Core_Object();
     $mecacheConfig->setHost('localhost');
     $mecacheConfig->setPort(1207);
     $mecacheConfig->setPersistent(true);
     $mecacheConfig->setCompression(9);
     $mecacheConfig->setCacheDir('/var/tmp');
     $mecacheConfig->setHashedDirectoryLevel(4);
     $mecacheConfig->setHashedDirectoryUmask();
     $mecacheConfig->setFileNamePrefix('CGS');
 }
Esempio n. 2
0
 /**
  * Constructir
  *
  * @param string $table
  * @param string $primary
  */
 public function __construct($table = NULL, $primary = NULL)
 {
     parent::__construct();
     $this->clear();
     $table && ($this->table = $table);
     $this->fields = cogear()->db->getFields($this->table);
     $this->reflection = new ReflectionClass($this);
     $fields = array_keys((array) $this->fields);
     $first = reset($fields);
     $this->primary = $primary ? $primary : $first;
 }
Esempio n. 3
0
 /**
  * Get or set form object
  * 
  * Form elements values are set automatically
  * 
  * @param object $data 
  */
 public function object($data = NULL)
 {
     $data && $this->setValues($data);
     return parent::object($data);
 }
Esempio n. 4
0
 /**
  * Constructor
  * 
  * @param   string  $name
  */
 public function __construct($name)
 {
     $this->name = $name;
     parent::__construct();
 }