- class_alias: documentation ( source)
<?php
namespace Sonata\CoreBundle\Validator;
class_alias(
\Sonata\Form\Validator\ErrorElement::class,
__NAMESPACE__.'\ErrorElement'
);
namespace Sonata\Form\Validator;
class ErrorElement {
public function test(\Sonata\CoreBundle\Validator\ErrorElement $test)
{
echo 'OK';
}
}
namespace something;
$a = new \Sonata\Form\Validator\ErrorElement();
$a->test($a);