static public function scope($name, array $params)
    {
        $cn = self::cn();
        self::$preventInit = true;
        $scopes = (new $cn())->scopes();
        
        if (isset($scopes[$name])) {
            $lambda = $scopes[$name];
            $relation = new Relation($cn, static::tableName());
            
            $lambda = $lambda->bindTo($relation);
            call_user_func_array($lambda, $params);
            return $relation;
        } else
            return false;
    }
static public function scope($name, array $params)
    {
        $cn = self::cn();
        self::$preventInit = true;
        $scopes = (new $cn())->scopes();
        
        if (isset($scopes[$name])) {
            $lambda = $scopes[$name];
            $relation = new Relation($cn, static::tableName());
            
            $lambda = $lambda->bindTo($relation);
            call_user_func_array($lambda, $params);
            return $relation;
        } else
            return false;
    }
static public function scope ( $ name , array $ params ) { $ cn = self :: cn ( ) ; self :: $ preventInit = true ; $ scopes = ( new $ cn ( ) ) -> scopes ( ) ; if ( isset ( $ scopes [ $ name ] ) ) { $ lambda = $ scopes [ $ name ] ; $ relation = new Relation ( $ cn , static :: tableName ( ) ) ; $ lambda = $ lambda -> bindTo ( $ relation ) ; call_user_func_array ( $ lambda , $ params ) ; return $ relation ; } else return false ; }
Checks if scope exists. If it does, executes it and
returns the relation; otherwise, returns false.
Checks if scope exists . If it does executes it and returns the relation ; otherwise returns false .