public create ( $data = null ) |
public function create($data = null)
{
$this->_is_new = true;
if (!is_null($data)) {
return $this->hydrate($data)->force_all_dirty();
}
return $this;
}
public function createmodels() { if (!auth::check(self::AUTH_REALM)) { $this->access_denied(); } $created = 0; $models = $this->getModels(); foreach ($models as $id => $model) { if (!$model['status']) { $created++; $filename = substr($model['info']['basename'], 0, strpos($model['info']['basename'], '.xml')); ORM::create($filename); } } $this->msg = "<strong>{$created} models</strong> created successfuly."; $this->database(); }