Source of file GitConfig.php
Size: 1,960 Bytes - Last Modified: 2014-05-08T01:19:22+02:00
/home/theseer/storage/php/phpdox/src/generator/enricher/git/GitConfig.php
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 | <?php namespace TheSeer\phpDox\Generator\Enricher { use TheSeer\fDOM\fDOMElement; use TheSeer\phpDox\FileInfo; use TheSeer\phpDox\GeneratorConfig; class GitConfig { /** * @var GeneratorConfig */ private $generator; /** * @var fDOMElement */ private $context; public function __construct(GeneratorConfig $generator, fDOMElement $ctx) { $this->context = $ctx; $this->generator = $generator; } /** * @return FileInfo */ public function getSourceDirectory() { return $this->generator->getProjectConfig()->getSourceDirectory(); } /** * @return string */ public function getGitBinary() { $git = $this->context->queryOne('cfg:git'); if (!$git) { return 'git'; } return $git->getAttribute('binary', 'git'); } /** * @return bool */ public function doLogProcessing() { $history = $this->context->queryOne('cfg:history'); if (!$history) { return true; } return $history->getAttribute('enabled', 'true') == 'true'; } /** * @return int */ public function getLogLimit() { $history = $this->context->queryOne('cfg:history'); if (!$history) { return 100; } return (int)$history->getAttribute('limit', 100); } public function getLogfilePath() { $history = $this->context->queryOne('cfg:history'); if (!$history || $history->getAttribute('cache') == '') { return $this->generator->getProjectConfig()->getWorkDirectory() . '/gitlog.xml'; } return $history->getAttribute('cache'); } } } |