public function find($search = null)
    {
        $results = array();
        if (empty($search)) {
            $results = $this->config;
        } elseif (is_scalar($search)) {
            $results = array_filter($this->config, function ($value, $key) use ($search) {
                    return strpos($key, $search) !== false;
                });
        } elseif (is_array($search)) {
            foreach ($search as $key) {
                if (!is_array($results)) $results = array();
                $results[$key] = $this->get($key);
            }
        }
        return $results;
    }
public function find($search = null)
    {
        $results = array();
        if (empty($search)) {
            $results = $this->config;
        } elseif (is_scalar($search)) {
            $results = array_filter($this->config, function ($value, $key) use ($search) {
                    return strpos($key, $search) !== false;
                });
        } elseif (is_array($search)) {
            foreach ($search as $key) {
                if (!is_array($results)) $results = array();
                $results[$key] = $this->get($key);
            }
        }
        return $results;
    }
public function find ( $ search = null ) { $ results = array ( ) ; if ( empty ( $ search ) ) { $ results = $ this -> config ; } elseif ( is_scalar ( $ search ) ) { $ results = array_filter ( $ this -> config , function ( $ value , $ key ) use ( $ search ) { return strpos ( $ key , $ search ) !== false ; } ) ; } elseif ( is_array ( $ search ) ) { foreach ( $ search as $ key ) { if ( ! is_array ( $ results ) ) $ results = array ( ) ; $ results [ $ key ] = $ this -> get ( $ key ) ; } } return $ results ; }
Find Config options by searching the keys.

Use null to return all Config options.

@param string|null $search An optional string to search the option keys with, or null to return all options.

@return array An array containing the options matching the search, or all options if null is passed.
Find Config options by searching the keys .