getSource() public static method

public static getSource ( )
Example #1
0
 /**
  * @return mixed
  * @deprecated use Nette\Utils\ObjectMixin::setExtensionMethod()
  */
 public static function extensionMethod($name, $callback = NULL)
 {
     if (strpos($name, '::') === FALSE) {
         $class = get_called_class();
     } else {
         list($class, $name) = explode('::', $name);
         $class = (new \ReflectionClass($class))->getName();
     }
     trigger_error("Extension methods such as {$class}::{$name}() are deprecated" . ObjectMixin::getSource(), E_USER_DEPRECATED);
     if ($callback === NULL) {
         return ObjectMixin::getExtensionMethod($class, $name);
     } else {
         ObjectMixin::setExtensionMethod($class, $name, $callback);
     }
 }