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; }