49 throw new LogicException(
"\$priority MUST be between LayoutModification::PRIORITY_LOW, LayoutModification::PRIORITY_MEDIUM or LayoutModification::PRIORITY_HIGH");
90 $clone->modification = $closure;
110 return ($this->modification instanceof Closure && $this->
checkClosure());
123 $r =
new ReflectionFunction($closure);
127 if (!isset($r->getParameters()[0])
128 || !$r->getParameters()[0]->hasType()
129 || ($r->getParameters()[0]->getType()->getName() !== $first_argument_type)
137 if (!$r->hasReturnType()
138 || ($r->getReturnType()->getName() !== $return_type)
143 }
catch (\ReflectionException
$e) {
An exception for terminatinating execution or to throw for unit testing.
withHighPriority()
@inheritDoc
withLowPriority()
@inheritDoc
getModification()
@inheritDoc
withPriority(int $priority)
@inheritDoc
hasValidModification()
@inheritDoc
withModification(Closure $closure)
Class LayoutModification.
getClosureFirstArgumentType()
firstArgumentAllowsNull()