Move '__clone' to generic trait
This commit is contained in:
parent
a21a99f10f
commit
6708888579
@ -69,6 +69,19 @@ trait Generic {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* PHP magic method that is called when an object is treated as a function
|
||||
*
|
||||
* @param array $args
|
||||
*/
|
||||
public static function __invoke($args = [])
|
||||
{
|
||||
$class = __CLASS__;
|
||||
return new $class($args);
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
@ -116,19 +129,6 @@ trait JSObject {
|
||||
return call_user_func_array($this->$name, $params);
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* PHP magic method that is called when an object is treated as a function
|
||||
*
|
||||
* @param array $args
|
||||
*/
|
||||
public static function __invoke($args = [])
|
||||
{
|
||||
$class = __CLASS__;
|
||||
return new $class($args);
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user