Ejemplo n.º 1
0
 public function __construct($id = null)
 {
     parent::__construct($id);
     if (!$this->loaded()) {
         // Set reasonable defaults
         $this->created = time();
         $this->rand_key = random::percent();
         $this->thumb_dirty = 1;
         $this->resize_dirty = 1;
         $this->sort_column = "created";
         $this->sort_order = "ASC";
         $this->owner_id = identity::active_user()->id;
     }
 }
Ejemplo n.º 2
0
 public function __construct($id = NULL)
 {
     parent::__construct($id);
     $this->_identifier = text::random();
 }