public static function getInstance($args = array()) { $obj = new FilesFixeds(); if (key_exists('tpl', $args)) { $obj->setTpl($args['tpl']); } if (key_exists('name', $args)) { $obj->setFileName($args['name']); } return $obj; }
/** * @return \Classes\AdapterMakerFile\FilesFixeds */ public function getFilesFixeds($key) { $key = strtolower($key); if (!isset($this->fileFixedData[$key])) { throw new \Exception('Não existe dados para popular o FilesFixeds ' . $key); } if (!isset($this->instanceFixedFile[$key]) or !$this->instanceFixedFile[$key] instanceof FilesFixeds) { $this->instanceFixedFile[$key] = FilesFixeds::getInstance($this->fileFixedData[$key]); } return $this->instanceFixedFile[$key]; }