src/SleepingOwl/Apist/Selectors/ApistSelector.php
protected function applyResultCallbackChain(Crawler $node, ApistMethod $method)
	{
		if (empty($this->resultMethodChain))
		{
			$this->addCallback('text');
		}
		/** @var ResultCallback[] $traceStack */
		$traceStack = [];
		foreach ($this->resultMethodChain as $resultCallback)
		{
			try
			{
				$traceStack[] = $resultCallback;
				$node = $resultCallback->apply($node, $method);
			} catch (InvalidArgumentException $e)
			{
				if ($method->getResource()->isSuppressExceptions())
				{
					return null;
				}
				$message = $this->createExceptionMessage($e, $traceStack);
				throw new InvalidArgumentException($message, 0, $e);
			}
		}
		return $node;
	}
protected function applyResultCallbackChain(Crawler $node, ApistMethod $method)
	{
		if (empty($this->resultMethodChain))
		{
			$this->addCallback('text');
		}
		/** @var ResultCallback[] $traceStack */
		$traceStack = [];
		foreach ($this->resultMethodChain as $resultCallback)
		{
			try
			{
				$traceStack[] = $resultCallback;
				$node = $resultCallback->apply($node, $method);
			} catch (InvalidArgumentException $e)
			{
				if ($method->getResource()->isSuppressExceptions())
				{
					return null;
				}
				$message = $this->createExceptionMessage($e, $traceStack);
				throw new InvalidArgumentException($message, 0, $e);
			}
		}
		return $node;
	}
Apply all result callbacks

@param Crawler $node
@param ApistMethod $method
@return array|string|Crawler