Drest\Query\ExposeFields::parseExposeString PHP Method

parseExposeString() protected method

preg_match_all( '/(?<=\[) # Assert that the previous characters is a [ (?: # Match either... [^[\]]* # any number of characters except brackets | # or \[ # an opening bracket (?R) # containing a match of this very regex \] # followed by a closing bracket )* # Repeat as needed (?=\]) # Assert the next character is a ]/x', $string, $result, PREG_PATTERN_ORDER);
protected parseExposeString ( string $string ) : array
$string string
return array $result
    protected function parseExposeString($string)
    {
        $string = trim($string);
        if (preg_match("/[^a-zA-Z0-9\\[\\]\\|_]/", $string) === 1) {
            throw InvalidExposeFieldsException::invalidExposeFieldsString();
        }
        $results = [];
        $this->recurseExposeString(trim($string, '|'), $results);
        return $results;
    }