code: public function apply($node, ApistMethod $method)
  	{
  		if (is_array($node))
  		{
  			return $this->applyToArray($node, $method);
  		}
  		if ($this->methodName === 'else')
  		{
  			if (is_bool($node)) $node = ! $node;
  			$this->methodName = 'then';
  		}
  
  		$filter = new ApistFilter($node, $method);
  		if (method_exists($filter, $this->methodName))
  		{
  			return call_user_func_array([
  					$filter,
  					$this->methodName
  				], $this->arguments);
  		}
  
  		if ($this->isResourceMethod($method))
  		{
  			return $this->callResourceMethod($method, $node);
  		}
  		if ($this->isNodeMethod($node))
  		{
  			return $this->callNodeMethod($node);
  		}
  		if ($this->isGlobalFunction())
  		{
  			return $this->callGlobalFunction($node);
  		}
  		throw new \InvalidArgumentException("Method '{$this->methodName}' was not found");
  	}
docs: Apply result callback to the $node, provided by $method
  
  @param Crawler $node
  @param ApistMethod $method
  @return array|string