has() public method

Checks if a node exists.
public has ( string $name ) : boolean
$name string
return boolean
Exemplo n.º 1
0
 /**
  * Initializes the workflow with a given token.
  *
  * @param string $token
  *
  * @return Workflow
  *
  * @throws Exception\InvalidTokenException
  */
 public function initialize($token = null)
 {
     if (null === $token) {
         $this->current = $this->start;
     } elseif ($this->nodes->has($token)) {
         $this->current = $this->nodes->get($token);
     } else {
         throw new Exception\InvalidTokenException();
     }
     return $this;
 }