Example #1
-1
File: Set.php Project: skema/skema
 public function getBean()
 {
     if ($this->bean !== null) {
         return $this->bean;
     }
     $bean = R::findOne('skemaset', ' name = ? ', [$this->name]);
     if (empty($bean)) {
         $bean = R::dispense('skemaset');
         $bean->name = $this->name;
         $bean->cleanName = Utility::cleanTableName($this->name);
         $bean->created = R::isoDateTime();
         $bean->description = '';
         $bean->ownFieldList;
         $bean->{'ownSkemarecord' . $this->cleanBaseName . 'List'};
     }
     return $this->bean = $bean;
 }