/** * Additionally checks whether the given filename is readable. * * @throws InvalidArgumentException * * @param string $value * * @return void */ public function setConfig($value) { if ($value && !is_readable($value) && strtolower($value) !== 'none') { throw new InvalidArgumentException('Config file "' . $value . '" is not readable'); } parent::setConfig($value); }
/** * Finds and initializes the given task. * * @param $task_name */ public function __construct($task_name) { // find the task which we want to use $task_parts = explode(':', $task_name); if (count($task_parts) == 1) { array_unshift($task_parts, 'project'); } $class_name = 'DocBlox_Task_' . ucfirst($task_parts[0]) . '_' . ucfirst($task_parts[1]); // sorry about the shut up operator but we do this check to determine whether this works // and Zend_Loader throws a warning if the class does not exist. if (!@class_exists($class_name)) { $this->log('Unable to execute task: ' . implode(':', $task_parts) . ', it is not found', DocBlox_Core_Log::CRIT); exit(1); } /** @var DocBlox_Task_Abstract $task */ $this->task = new $class_name(); $this->task->parse(true); }
/** * Returns the name of the current template, or the default. * * @return string */ public function getTemplate() { return parent::getTemplate() ? parent::getTemplate() : DocBlox_Core_Abstract::config()->transformations->template->name; }
/** * Returns the list of markers to scan for and summize in their separate page. * * @return string[] */ public function getMarkers() { if (parent::getMarkers()) { return explode(',', parent::getMarkers()); } return DocBlox_Core_Abstract::config()->getArrayFromPath('parser/markers/item'); }