public static function scope($name, $conditions)
    {
        $cls = get_called_class();

        if (!array_key_exists($cls, self::$_scopes)) {
            self::$_scopes[$cls] = array();
        }

        if (!array_key_exists($name, self::$_scopes[$cls])) {
            self::$_scopes[$cls][$name] = array();
        }

        self::$_scopes[$cls][$name] = $conditions;
    }
public static function scope($name, $conditions)
    {
        $cls = get_called_class();

        if (!array_key_exists($cls, self::$_scopes)) {
            self::$_scopes[$cls] = array();
        }

        if (!array_key_exists($name, self::$_scopes[$cls])) {
            self::$_scopes[$cls][$name] = array();
        }

        self::$_scopes[$cls][$name] = $conditions;
    }
public static function scope ( $ name , $ conditions ) { $ cls = get_called_class ( ) ; if ( ! array_key_exists ( $ cls , self :: $ _scopes ) ) { self :: $ _scopes [ $ cls ] = array ( ) ; } if ( ! array_key_exists ( $ name , self :: $ _scopes [ $ cls ] ) ) { self :: $ _scopes [ $ cls ] [ $ name ] = array ( ) ; } self :: $ _scopes [ $ cls ] [ $ name ] = $ conditions ; }
Create a scope

@param string $name       of scope
@param mixed  $conditions to avail

@return null
Create a scope