Beispiel #1
0
 /**
  * Initiliaze from array
  *
  * @param array $array Data
  *
  * @return Model
  */
 public static function fromArray(array $array)
 {
     $scriptTable = new Model();
     $scriptTable->setData($array);
     $scriptTable->setOrigData();
     if (empty($array['content'])) {
         $scriptTable->setContent($scriptTable->getContent());
     }
     return $scriptTable;
 }