Beispiel #1
0
 public function __construct($id = 0, $data = null)
 {
     parent::__construct($id, $data);
     if ($this->id && ($filedata = get_record('artefact_file_image', 'artefact', $this->id))) {
         foreach ($filedata as $name => $value) {
             if (property_exists($this, $name)) {
                 $this->{$name} = $value;
             }
         }
     }
 }
Beispiel #2
0
 public function __construct($id = 0, $data = null)
 {
     parent::__construct($id, $data);
     if ($this->id) {
         $descriptions = self::video_file_descriptions();
         $validtypes = self::video_mime_types();
         $this->videotype = $descriptions[$validtypes[$this->filetype]->description];
     }
 }