dbObject::__callStatic PHP Méthode

__callStatic() public static méthode

Transparently creating dbObject class to provide smooth API like name::get() name::orderBy()->get()
public static __callStatic ( string $method, mixed $arg ) : mixed
$method string
$arg mixed
Résultat mixed
    public static function __callStatic($method, $arg)
    {
        $obj = new static();
        $result = call_user_func_array(array($obj, $method), $arg);
        if (method_exists($obj, $method)) {
            return $result;
        }
        return $obj;
    }