コード例 #1
0
ファイル: item.php プロジェクト: assad2012/gallery3-appfog
 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;
     }
 }
コード例 #2
0
ファイル: page.php プロジェクト: googlecode-mirror/s7ncms
 public function __construct($id = NULL)
 {
     parent::__construct($id);
     $this->_identifier = text::random();
 }