Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
9 / 9 |
CRAP | |
100.00% |
20 / 20 |
Assets | |
100.00% |
1 / 1 |
|
100.00% |
9 / 9 |
9 | |
100.00% |
20 / 20 |
__construct | |
100.00% |
1 / 1 |
1 | |
100.00% |
3 / 3 |
|||
root | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
assetsRoot | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
webRoot | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
configStorage | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
buildRoot | |
100.00% |
1 / 1 |
1 | |
100.00% |
3 / 3 |
|||
buildAssetsRoot | |
100.00% |
1 / 1 |
1 | |
100.00% |
3 / 3 |
|||
buildWebRoot | |
100.00% |
1 / 1 |
1 | |
100.00% |
3 / 3 |
|||
buildConfigStorage | |
100.00% |
1 / 1 |
1 | |
100.00% |
4 / 4 |
<?php | |
namespace PHPixie\BundleFramework; | |
class Assets extends \PHPixie\Framework\Assets | |
{ | |
protected $rootDirectory; | |
public function __construct($builder, $rootDirectory) | |
{ | |
$this->rootDirectory = $rootDirectory; | |
parent::__construct($builder); | |
} | |
public function root() | |
{ | |
return $this->instance('root'); | |
} | |
public function assetsRoot() | |
{ | |
return $this->instance('assetsRoot'); | |
} | |
public function webRoot() | |
{ | |
return $this->instance('webRoot'); | |
} | |
public function configStorage() | |
{ | |
return $this->instance('configStorage'); | |
} | |
protected function buildRoot() | |
{ | |
return $this->buildFilesystemRoot( | |
$this->rootDirectory | |
); | |
} | |
protected function buildAssetsRoot() | |
{ | |
return $this->buildFilesystemRoot( | |
$this->root()->path('assets') | |
); | |
} | |
protected function buildWebRoot() | |
{ | |
return $this->buildFilesystemRoot( | |
$this->root()->path('web') | |
); | |
} | |
protected function buildConfigStorage() | |
{ | |
$config = $this->components->config(); | |
return $config->directory( | |
$this->assetsRoot()->path(), | |
'config' | |
); | |
} | |
} |