public static function getScope($name, $cls = null)
    {
        if (!$cls) {
            $cls = get_called_class();
        }

        if (!array_key_exists($cls, self::$_scopes)
            || !array_key_exists($name, self::$_scopes[$cls])
        ) {
            return null;
        }

        return self::$_scopes[$cls][$name];
    }