39 lines
809 B
PHP
39 lines
809 B
PHP
<?php namespace ZN\EventHandler;
|
|
/**
|
|
* ZN PHP Web Framework
|
|
*
|
|
* "Simplicity is the ultimate sophistication." ~ Da Vinci
|
|
*
|
|
* @package ZN
|
|
* @license MIT [http://opensource.org/licenses/MIT]
|
|
* @author Ozan UYKUN [ozan@znframework.com]
|
|
*/
|
|
|
|
trait EventCallable
|
|
{
|
|
/**
|
|
* Magic call static
|
|
*
|
|
* @param string $method
|
|
* @param array $parameters
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public static function __callStatic($method, $parameters)
|
|
{
|
|
return self::run($method, ...$parameters);
|
|
}
|
|
|
|
/**
|
|
* Magic call for facade Events::run()
|
|
*
|
|
* @param string $method
|
|
* @param array $parameters
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function __call($method, $parameters)
|
|
{
|
|
return self::run($method, ...$parameters);
|
|
}
|
|
} |