Source of file CheckStyleConfig.php
Size: 1,228 Bytes - Last Modified: 2014-09-04T20:29:32+02:00
/home/theseer/storage/php/phpdox/src/generator/enricher/checkstyle/CheckStyleConfig.php
12345678910111213141516171819202122232425262728293031323334353637383940414243444546 | <?php namespace TheSeer\phpDox\Generator\Enricher { use TheSeer\fDOM\fDOMElement; use TheSeer\phpDox\GeneratorConfig; class CheckStyleConfig { /** * @var GeneratorConfig */ private $generator; /** * @var fDOMElement */ private $context; protected $defaultFileName = 'checkstyle.xml'; public function __construct(GeneratorConfig $generator, fDOMElement $ctx) { $this->context = $ctx; $this->generator = $generator; } public function getLogFilePath() { $basedirDefault = dirname($this->context->ownerDocument->baseURI); $path = $basedirDefault . '/build/logs'; if ($this->context->parentNode->hasAttribute('base')) { $path = $this->context->parentNode->getAttribute('base'); } if ($path != '') { $path .= '/'; } $file = $this->context->queryOne('cfg:file'); if ($file && $file->hasAttribute('name')) { $path .= $file->getAttribute('name'); } else { $path .= $this->defaultFileName; } return $path; } } } |