Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
4 / 4
Attribute
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
4 / 4
 __construct
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
3 / 3
 getProcessorNameFor
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
<?php
namespace PHPixie\HTTPProcessors\Processor\Dispatcher\Registry;
class Attribute extends \PHPixie\Processors\Processor\Dispatcher\Registry
{
    protected $attributeName;
    
    public function __construct($processorRegistry, $attributeName)
    {
        $this->attributeName = $attributeName;
        parent::__construct($processorRegistry);
    }
    
    protected function getProcessorNameFor($httpRequest)
    {
        return $httpRequest->attributes()->get($this->attributeName);
    }
}