Inheritance: extends eZ\Publish\Core\REST\Common\Input\BaseParser
コード例 #1
0
 /**
  * Gets the section parser.
  *
  * @return \eZ\Publish\Core\REST\Client\Input\Parser\VersionInfo
  */
 protected function getParser()
 {
     $parser = new Input\Parser\VersionInfo(new ParserTools(), $this->getContentServiceMock());
     $parser->setRequestParser($this->getRequestParserMock());
     return $parser;
 }
コード例 #2
0
ファイル: Content.php プロジェクト: Heyfara/ezpublish-kernel
 /**
  * Parse input structure.
  *
  * @param array $data
  * @param \eZ\Publish\Core\REST\Common\Input\ParsingDispatcher $parsingDispatcher
  *
  * @todo Error handling
  *
  * @return \eZ\Publish\API\Repository\Values\Content\Content
  */
 public function parse(array $data, ParsingDispatcher $parsingDispatcher)
 {
     $versionInfo = $this->versionInfoParser->parse($data['VersionInfo'], $parsingDispatcher);
     $fields = $this->parseFields($data['Fields'], $versionInfo->contentInfoId);
     return new Values\Content\Content($this->contentService, array('versionInfo' => $versionInfo, 'internalFields' => $fields));
 }
コード例 #3
0
ファイル: Content.php プロジェクト: Pixy/ezpublish-kernel
 /**
  * Parse input structure.
  *
  * @param array $data
  * @param \eZ\Publish\Core\REST\Common\Input\ParsingDispatcher $parsingDispatcher
  *
  * @todo Error handling
  *
  * @return \eZ\Publish\API\Repository\Values\Content\Content
  */
 public function parse(array $data, ParsingDispatcher $parsingDispatcher)
 {
     $versionInfo = $this->versionInfoParser->parse($data['CurrentVersion']['Version']['VersionInfo'], $parsingDispatcher);
     $fields = $this->parseFields($data['CurrentVersion']['Version']['Fields'], str_replace('/api/ezp/v2/content/objects/', '', $versionInfo->contentInfoId));
     return new Values\Content\Content($this->contentService, array('versionInfo' => $versionInfo, 'internalFields' => $fields));
 }