Introspects which resources and actions are accessible on this resource.

@param string|null $name

@return array|bool
197307
public function respondsTo($name = null)
    {
        if ($name) {
            return isset($this->meta['methods'][$name]);
        } else {
            return array_keys($this->meta['methods']);
        }
    }
557573
public function get($name) {
        return isset($this->metadata[$name]) ? $this->metadata[$name] : null;
    }
803070
public function getProps($name)
    {
        return isset($this->props[$name]) ? $this->props[$name] : null;
    }
193014
public final function getOption($name)
    {
        return isset($this->_options[$name]) ? $this->_options[$name] : null;
    }
1120833
protected function getConfigure(string $name): ?array
    {
        if (isset($this->config[$name])) {
            return $this->config[$name];
        }

        if (!isset($this->abstractAlias[$name])) {
            return null;
        }

        foreach ($this->abstractAlias[$name] as $alias) {
            if (isset($this->config[$alias])) {
                return $this->config[$alias];
            }
        }

        return null;
    }
589124
public function findNeedByName($name)
    {
        // No needs defined yet.
        if (is_null($this->needs)) {
            return null;
        }

        // Traverse and Return.
        return $this->traverseNodesAndFindBy('name', $name, $this->needs);
    }
886329
public function getRoles($name)
    {
        $route = $this->router->getRoutes()->getByName($name);

        // If route not exists, return NULL
        if ($route === null) {
            return null;
        }

        $roles = [];

        // Get permissions from array syntax
        $action = $route->getAction();

        if (array_key_exists('role', $action)) {
            $roles[] = $action['role'];
        }

        if (array_key_exists('roles', $action)) {
            $roles = array_merge($roles, $action['roles']);
        }

        return array_unique($roles);
    }
1205102
public function read($name = null)
    {

        if (!isset($_SESSION)) {
            return null;
        }

        if ($name === null) {
            return isset($_SESSION) ? $_SESSION : [];
        }

        return Hash::get($_SESSION, $name);
    }
626534
public static function getFunction(string $name)
    {
        return isset(self::$functions[$name]) ? self::$functions[$name] : null;
    }
1277005
public function getAlias($name)
        {
            if (isset($this->_aliases[$name])) {
                return $this->_aliases[$name];
            }

            return null;
        }
401201
public function usersAction($name)
    {
        $server = $this->ldap->get($name);
        $user = isset($server['user']) ? $server['user'] : null;
        $password = isset($server['password']) ? $server['password'] : null;

        if ($this->ldap->connect($server, $user, $password)) {
            $classes = $this->ldap->getClasses($server);
            $users = $this->ldap->getUsers($server);
            $this->ldap->close();

            return [
                'server' => $server,
                'users' => $users,
                'usersJSON' => json_encode($users),
                'classes' => $classes,
            ];
        }

        return ['error' => true];
    }
48417
public function getProperty($name)
    {
        return isset($this->visitInfo[$name]) ? $this->visitInfo[$name] : null;
    }
729511
public static function getOption($name = null)
    {
        if (null === $name) {
            return self::$_options;
        } else {
            return isset(self::$_options[$name])? self::$_options[$name]: null;
        }
    }
416971
public function env($name)
    {
        return isset($this->_envs[$name])
            ? $this->_envs[$name]
            : null;
    }
938930
public function getFilterParameters($name)
    {
        return isset($this->odmOptions['filters'][$name])
            ? $this->odmOptions['filters'][$name]['parameters']
            : null;
    }
1118315
public function getAlias($name)
    {
        $aliases = $this->getAliases();
        if (isset($aliases[$name])) {
            return $aliases[$name];
        }
        return null;
    }
857785
protected function getList($name)
    {
        if (null === ($list = $this->cache->get($name)) || !\is_array($list)) {
            return [];
        }

        return $list;
    }