Exemplo n.º 1
0
 /**
  * Executes the matcher on a given argument value.
  *
  * Sets the $argument to the value passed in the constructor
  *
  * @param mixed $argument
  *
  * @return boolean
  */
 public function matches(&$argument)
 {
     if ($this->matcher === null || $this->matcher->matches($argument)) {
         $argument = $this->value;
         return true;
     }
     return false;
 }
Exemplo n.º 2
0
 public function __toString()
 {
     return sprintf('<captured parameter%s>', isset($this->matcher) ? " that is {$this->matcher->__toString()}" : '');
 }
Exemplo n.º 3
0
 /**
  * Executes the matcher on a given argument value. Returns TRUE on a match, FALSE otherwise.
  *
  * @param mixed $argument
  *
  * @return boolean
  */
 protected function matches(&$argument)
 {
     $this->adaptedMatcher->matches($argument);
 }