Bolt\Storage\Query\ContentQueryParser::parseOperation PHP Method

parseOperation() protected method

A simple select operation will just contain the ContentType eg 'pages' but additional operations can be triggered using the '/' separator.
protected parseOperation ( )
    protected function parseOperation()
    {
        $operation = 'select';
        $queryParts = explode('/', $this->query);
        array_shift($queryParts);
        if (!count($queryParts)) {
            $this->operation = $operation;
            return;
        }
        if (in_array($queryParts[0], $this->operations)) {
            $operation = array_shift($queryParts);
            $this->params['limit'] = array_shift($queryParts);
            $this->identifier = implode(',', $queryParts);
        } else {
            $this->identifier = implode(',', $queryParts);
        }
        if (!empty($this->identifier)) {
            $operation = 'namedselect';
        }
        $this->operation = $operation;
    }