The following code does not generate any actual validation code for the RootNode class.
class RootNode implements ParentNodeInterface
{
use ParentNodeTrait {
destroy as destroyChildren;
}
/**
* @param EngineInterface $engine The engine to which this node belongs.
*/
public function __construct(EngineInterface $engine)
{
$this->typeCheck = TypeCheck::get(__CLASS__, func_get_args());
$this->engine = $engine;
}
If I change the use statement to (note the protected keyword):
use ParentNodeTrait {
destroy as protected destroyChildren;
}
The following code does not generate any actual validation code for the
RootNode
class.If I change the use statement to (note the protected keyword):
It works.
No error is displayed.