public canEvaluate ( $context ) : boolean | ||
return | boolean | TRUE if the operation can be applied onto the $context, FALSE otherwise |
public function canEvaluate($context)
{
if (count($context) === 0) {
return true;
}
foreach ($context as $contextNode) {
if (!$contextNode instanceof NodeInterface) {
return false;
}
}
return true;
}