for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the Ray.Aop package
*
* @license http://opensource.org/licenses/bsd-license.php BSD
*/
namespace Ray\Aop;
class BuiltinMatcher extends AbstractMatcher
{
* @var array
protected $arguments;
* @var string
private $matcherName;
* @var AbstractMatcher
private $matcher;
* @param string $matcherName
* @param array $arguments
public function __construct($matcherName, array $arguments)
$this->matcherName = $matcherName;
$this->arguments = $arguments;
$matcher = 'Ray\Aop\Matcher\\' . ucwords($this->matcherName) . 'Matcher';
$this->matcher = (new \ReflectionClass($matcher))->newInstance();
}
* {@inheritdoc}
public function matchesClass(\ReflectionClass $class, array $arguments)
return $this->matcher->matchesClass($class, $arguments);
public function matchesMethod(\ReflectionMethod $method, array $arguments)
return $this->matcher->matchesMethod($method, $arguments);