{@inheritdoc}

@see \C5TL\Parser\DynamicItem\DynamicItem::parseManual()
429393
public function parseManual(\Gettext\Translations $translations, $concrete5version)
    {
        $pkcNameMap = array(
            'page' => 'Page',
            'single_page' => 'Single page',
            'stack' => 'Stack',
            'composer_page' => 'Composer page',
            'user' => 'User',
            'file_set' => 'File set',
            'file' => 'File',
            'area' => 'Area',
            'block_type' => 'Block type',
            'block' => 'Block',
            'admin' => 'Administration',
            'sitemap' => 'Site map',
            'marketplace_newsflow' => 'MarketPlace newsflow',
            'basic_workflow' => 'Basic workflow',
        );
        if (version_compare($concrete5version, '5.7') < 0) {
            $pkcClass = '\PermissionKeyCategory';
        } else {
            $pkcClass = '\Concrete\Core\Permission\Category';
        }
        if (class_exists($pkcClass, true) && method_exists($pkcClass, 'getList')) {
            foreach (call_user_func($pkcClass.'::getList') as $pkc) {
                $pkcHandle = $pkc->getPermissionKeyCategoryHandle();
                $this->addTranslation($translations, isset($pkcNameMap[$pkcHandle]) ? $pkcNameMap[$pkcHandle] : ucwords(str_replace(array('_', '-', '/'), ' ', $pkcHandle)));
            }
        }
    }
64741
public function parse()
	{
		if ($this->input === null)
		{
			throw new LogicException('You must specify an IOInterface for input first.');
		}

		return $this->parser->parse(
			$this->input->getContent()
		);
	}
976648
public function parseManyFromArray( array $input )
    {
        $items = array();
        foreach ($input as $itemArray)
        {
            $items[] = $this->parseOneFromArray($itemArray);
        }

        return $items;
    }
108345
private function processAttributes($data, ApiItemInterface $item)
    {
        $result = true;
        try {
            if (isset($data['attributes']) && is_array($data['attributes'])) {
                /** @var ItemAttribute $itemAttribute */
                $get = function ($itemAttribute) {
                    return $itemAttribute->getId();
                };

                $delete = function ($itemAttribute) use ($item) {
                    // Delete item.
                    $this->em->remove($itemAttribute);
                };

                /** @var ItemAttribute $itemAttribute */
                $update = function ($itemAttribute, $matchedEntry) use ($item) {
                    $itemAttribute->setAttribute($matchedEntry['attribute']);
                    $itemAttribute->setValue($matchedEntry['value']);

                    return $itemAttribute ? true : false;
                };

                $add = function ($itemData) use ($item) {
                    $itemAttribute = new ItemAttribute();
                    $itemAttribute->setAttribute($itemData['attribute']);
                    $itemAttribute->setValue($itemData['value']);
                    $itemAttribute->setItem($item->getEntity());
                    $this->em->persist($itemAttribute);

                    return $item->addAttribute($itemAttribute);
                };

                $result = $this->processSubEntities(
                    $item->getAttributes(),
                    isset($data['attributes']) ? $data['attributes'] : [],
                    $get,
                    $add,
                    $update,
                    $delete
                );
            }
        } catch (\Exception $e) {
            throw new ItemException('Error while creating attributes: ' . $e->getMessage());
        }

        return $result;
    }
336594
public function toASN1(): Element
    {
        switch ($this->_type) {
            case Element::TYPE_OCTET_STRING:
                return new OctetString($this->_value);
            case Element::TYPE_UTF8_STRING:
                return new UTF8String($this->_value);
            case Element::TYPE_OBJECT_IDENTIFIER:
                return new ObjectIdentifier($this->_value);
        }
        throw new \LogicException(
            "Type " . Element::tagToName($this->_type) . " not supported.");
    }
534724
public function parseManual(\Gettext\Translations $translations, $concrete5version)
    {
        if (class_exists('\JobSet', true)) {
            foreach (\JobSet::getList() as $js) {
                $this->addTranslation($translations, $js->getJobSetName(), 'JobSetName');
            }
        }
    }
333444
public function parser(
        string $className,
        $objectAnnotation = null,
        string $propertyName = '',
        string $methodName = '',
        $propertyValue = null
    ) {
        $collector = ControllerCollector::getCollector();

        if (!isset($collector[$className])) {
            return;
        }

        // Collect requestMapping
        ControllerCollector::collect($className, $objectAnnotation, $propertyName, $methodName, $propertyValue);
    }
892432
def ParseMany(text):
  
  precondition.AssertType(text, Text)

  if compatibility.PY2:
    text = text.encode("utf-8")

  return list(yaml.safe_load_all(text))
1039965
public function parse() {
        global $argv;

        $options = array();
        $parameters = array();
        $argc = count( $argv );
        $paramCount = count( $this->parameters );
        
        //get parameters
        if( $argc - 1 < $paramCount ) {
            throw new \Exception("The command requires $paramCount parameters.");
        }
        
        //last items are the params
        for( $i = $paramCount - 1; $i >= 0; $i-- ) {
            $this->abstractParameters[$this->parameters[$i]] = $argv[$argc - $i - 1];
        }
        
        //go through each arg
        for( $i = 1; $i < $argc - $paramCount; $i++ ) {
            $arg = $argv[$i];
            
            //cannot start without a switch
            if( !$this->isOption( $arg ) ) {
                throw new \Exception("Invalid argument \"$arg\".");
            }
            
            //check if it's a valid option
            $option = $arg[1];

            if( $this->isParam( $option ) ) {
                //the arg stands on its own, such as -f, not -ffile.txt
                //set next as its value, move $i ahead
                if( $this->isSolitary( $arg ) ) {
                    //last item
                    if( $i == $argc - $paramCount - 1 ) {
                        throw new \Exception("Parameter does not follow the option \"$option\".");
                    }
                    
                    $this->abstractOptions[$option] = $argv[$i+1];
                    $i++;
                } else {
                    $this->abstractOptions[$option] = substr( $arg, 2 );
                }
            } else if( $this->isSwitch( $option ) ) {
                //loop through all switches in the param
                for( $i = 1; $i < strlen( $param ) - 1; $i++ ) {
                    $s = $arg[$i];
                    
                    //not a switch
                    if( !$this->isSwitch( $arg[$i] ) ) {
                        throw new \Exception("An invalid switch \"$s\" was provided.");
                    }
                    
                    $this->abstractOptions[$s] = true;
                }
            }
        }
    }
343430
public function parse(string $name): Parse
    {
        if (isset($this->values[$name])) {
            return new Parse($this->values[$name]);
        }

        return new Parse(null);
    }
160333
public function parse(array $data, ParsingDispatcher $parsingDispatcher)
    {
        if (!is_array($data) || 'operations' !== key($data)) {
            throw new Exceptions\Parser('Invalid structure for BulkOperation.');
        }

        if (array_key_exists('uri', $data['operations'])) {
            $operationData[] = $data['operations'];
        } else {
            $operationData = $data['operations'];
        }

        $operations = [];
        foreach ($operationData as $operationId => $operation) {
            $operations[$operationId] = $parsingDispatcher->parse($operation, 'application/vnd.ez.api.internal.Operation');
        }

        return new BulkOperationValue($operations);
    }
250579
public function parseManual(\Gettext\Translations $translations, $concrete5version)
    {
        $akcNameMap = array(
            'collection' => 'Page attributes',
            'user' => 'User attributes',
            'file' => 'File attributes',
        );
        if (version_compare($concrete5version, '5.7') < 0) {
            $akcClass = '\AttributeKeyCategory';
        } else {
            $akcClass = '\Concrete\Core\Attribute\Key\Category';
        }
        if (class_exists($akcClass, true) && method_exists($akcClass, 'getList')) {
            foreach (call_user_func($akcClass.'::getList') as $akc) {
                $akcHandle = $akc->getAttributeKeyCategoryHandle();
                $this->addTranslation($translations, isset($akcNameMap[$akcHandle]) ? $akcNameMap[$akcHandle] : ucwords(str_replace(array('_', '-', '/'), ' ', $akcHandle)));
            }
        }
    }
1311939
private function parse()
    {
        // Skip if already parsed!
        if ($this->parsed) {
            return;
        }

        // Type switch
        switch($this->query->mode){
            case Query::MODE_SELECT:
                $this->parseSelectQuery(); break;
            case Query::MODE_INSERT:
                $this->parseInsertQuery(); break;
            case Query::MODE_UPDATE:
                $this->parseUpdateQuery(); break;
            case Query::MODE_DELETE:
                $this->parseDeleteQuery(); break;
            case Query::MODE_TRUNCATE:
                $this->parseTruncateQuery(); break;
            case Query::MODE_ADVANCED:
                throw new QueryBuilderParseException("Query mode not yet implemented!"); break; // @codeCoverageIgnore
            case Query::MODE_NONE:
                throw new QueryBuilderParseException("Query has no mode yet!"); break; // @codeCoverageIgnore
            default:
                throw new QueryBuilderParseException("Query mode is invalid!"); break; // @codeCoverageIgnore
        }


        // Set parsed to true.
        $this->parsed = true;
    }
497596
protected function doParse()
    {
        $object = $this->objectNameToKey($this->objectName);

        if ('ok' !== $this->data['@attributes']['stat']) {
            $errorCode = (int) $this->data['@attributes']['err_code'];
            $errorMessage = $this->data['err'];

            if (in_array($errorCode, array(1, 15))) {
                throw new AuthenticationErrorException($errorMessage, $errorCode);
            } else {
                throw new RuntimeException($errorMessage, $errorCode);
            }
        } else {
            if (array_key_exists('result', $this->data)) {
                $this->parseMultiRecordResult($object, $this->data);
            } elseif (array_key_exists($object, $this->data)) {
                $this->parseSingleRecordResult($object, $this->data);
            } elseif (array_key_exists('api_key', $this->data)) {
                $this->resultCount = 0;
                $this->result = $this->data['api_key'];
            } else {
                $asString = true;
                throw new RuntimeException('Unknown response format: '.$this->responseObj->getBoby($asString));
            }
        }
    }
868149
protected function parseOrder()
    {
        if (!isset($this->parts['order']) || !is_array($this->parts['order']) || count($this->parts['order']) < 1) {
            return false;
        }

        $orderParts = [];

        foreach ($this->parts['order'] as $itemOrder) {
            if ($itemOrder) {
                if (!is_array($itemOrder)) {
                    $itemOrder = [$itemOrder];
                }

                $column = isset($itemOrder[0]) ? $itemOrder[0] : false;
                $type = isset($itemOrder[1]) ? $itemOrder[1] : '';
                $protected = isset($itemOrder[2]) ? $itemOrder[2] : true;

                $column = ($protected ? $this->protect($column) : $column).' '.strtoupper($type);

                $orderParts[] = trim($column);
            }
        }

        return implode(', ', $orderParts);
    }
11274
protected function parseTitle() {
    if (is_object($this->file)) {
      if (isset($this->file->title)) {
        return $this->file->title;
      }
    }

    if (is_array($this->file)) {
      if (isset($this->file['title'])) {
        return $this->file['title'];
      }
    }

    return '';
  }
1180417
public function parse(array $data, ParsingDispatcher $parsingDispatcher)
    {
        $objectStateUpdateStruct = $this->objectStateService->newObjectStateUpdateStruct();

        if (array_key_exists('identifier', $data)) {
            $objectStateUpdateStruct->identifier = $data['identifier'];
        }

        if (array_key_exists('defaultLanguageCode', $data)) {
            $objectStateUpdateStruct->defaultLanguageCode = $data['defaultLanguageCode'];
        }

        if (array_key_exists('names', $data)) {
            if (!is_array($data['names'])) {
                throw new Exceptions\Parser("Missing or invalid 'names' element for ObjectStateUpdate.");
            }

            if (!array_key_exists('value', $data['names']) || !is_array($data['names']['value'])) {
                throw new Exceptions\Parser("Missing or invalid 'names' element for ObjectStateUpdate.");
            }

            $objectStateUpdateStruct->names = $this->parserTools->parseTranslatableList($data['names']);
        }

        if (array_key_exists('descriptions', $data) && is_array($data['descriptions'])) {
            $objectStateUpdateStruct->descriptions = $this->parserTools->parseTranslatableList($data['descriptions']);
        }

        return $objectStateUpdateStruct;
    }