Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
5 / 5
CRAP
100.00% covered (success)
100.00%
8 / 8
Filesystem
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
5 / 5
5
100.00% covered (success)
100.00%
8 / 8
 __construct
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
2 / 2
 builder
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 root
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 buildLocator
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
3 / 3
 buildBuilder
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
<?php
namespace PHPixie;
class Filesystem
{
    protected $builder;
    
    public function __construct()
    {
        $this->builder = $this->buildBuilder();
    }
    
    public function builder()
    {
        return $this->builder;
    }
    
    public function root($directory)
    {
        return $this->builder->root($directory);
    }
    
    public function buildLocator($configData, $root, $locatorRegistry = null)
    {
        $locators = $this->builder->locators();
        $builder  = $locators->builder($root, $locatorRegistry);
        return $builder->buildFromConfig($configData);
    }
    
    protected function buildBuilder()
    {
        return new Filesystem\Builder();
    }
}