eZ/Publish/Core/REST/Server/Output/ValueObjectVisitor/CreatedContent.php 1 location
|
@@ 19-40 (lines=22) @@
|
| 16 |
|
/** |
| 17 |
|
* CreatedContent value object visitor. |
| 18 |
|
*/ |
| 19 |
|
class CreatedContent extends RestContent |
| 20 |
|
{ |
| 21 |
|
/** |
| 22 |
|
* Visit struct returned by controllers. |
| 23 |
|
* |
| 24 |
|
* @param \eZ\Publish\Core\REST\Common\Output\Visitor $visitor |
| 25 |
|
* @param \eZ\Publish\Core\REST\Common\Output\Generator $generator |
| 26 |
|
* @param \eZ\Publish\Core\REST\Server\Values\CreatedContent $data |
| 27 |
|
*/ |
| 28 |
|
public function visit(Visitor $visitor, Generator $generator, $data) |
| 29 |
|
{ |
| 30 |
|
parent::visit($visitor, $generator, $data->content); |
| 31 |
|
$visitor->setHeader( |
| 32 |
|
'Location', |
| 33 |
|
$this->router->generate( |
| 34 |
|
'ezpublish_rest_loadContent', |
| 35 |
|
array('contentId' => $data->content->contentInfo->id) |
| 36 |
|
) |
| 37 |
|
); |
| 38 |
|
$visitor->setStatus(201); |
| 39 |
|
} |
| 40 |
|
} |
| 41 |
|
|
eZ/Publish/Core/REST/Server/Output/ValueObjectVisitor/CreatedContentTypeGroup.php 1 location
|
@@ 21-42 (lines=22) @@
|
| 18 |
|
* |
| 19 |
|
* @todo coverage add test |
| 20 |
|
*/ |
| 21 |
|
class CreatedContentTypeGroup extends ContentTypeGroup |
| 22 |
|
{ |
| 23 |
|
/** |
| 24 |
|
* Visit struct returned by controllers. |
| 25 |
|
* |
| 26 |
|
* @param \eZ\Publish\Core\REST\Common\Output\Visitor $visitor |
| 27 |
|
* @param \eZ\Publish\Core\REST\Common\Output\Generator $generator |
| 28 |
|
* @param \eZ\Publish\Core\REST\Server\Values\CreatedContentTypeGroup $data |
| 29 |
|
*/ |
| 30 |
|
public function visit(Visitor $visitor, Generator $generator, $data) |
| 31 |
|
{ |
| 32 |
|
parent::visit($visitor, $generator, $data->contentTypeGroup); |
| 33 |
|
$visitor->setHeader( |
| 34 |
|
'Location', |
| 35 |
|
$this->router->generate( |
| 36 |
|
'ezpublish_rest_loadContentTypeGroup', |
| 37 |
|
array('contentTypeGroupId' => $data->contentTypeGroup->id) |
| 38 |
|
) |
| 39 |
|
); |
| 40 |
|
$visitor->setStatus(201); |
| 41 |
|
} |
| 42 |
|
} |
| 43 |
|
|
eZ/Publish/Core/REST/Server/Output/ValueObjectVisitor/CreatedLocation.php 1 location
|
@@ 21-42 (lines=22) @@
|
| 18 |
|
* |
| 19 |
|
* @todo coverage add test |
| 20 |
|
*/ |
| 21 |
|
class CreatedLocation extends RestLocation |
| 22 |
|
{ |
| 23 |
|
/** |
| 24 |
|
* Visit struct returned by controllers. |
| 25 |
|
* |
| 26 |
|
* @param \eZ\Publish\Core\REST\Common\Output\Visitor $visitor |
| 27 |
|
* @param \eZ\Publish\Core\REST\Common\Output\Generator $generator |
| 28 |
|
* @param \eZ\Publish\Core\REST\Server\Values\CreatedLocation $data |
| 29 |
|
*/ |
| 30 |
|
public function visit(Visitor $visitor, Generator $generator, $data) |
| 31 |
|
{ |
| 32 |
|
parent::visit($visitor, $generator, $data->restLocation); |
| 33 |
|
$visitor->setHeader( |
| 34 |
|
'Location', |
| 35 |
|
$this->router->generate( |
| 36 |
|
'ezpublish_rest_loadLocation', |
| 37 |
|
array('locationPath' => trim($data->restLocation->location->pathString, '/')) |
| 38 |
|
) |
| 39 |
|
); |
| 40 |
|
$visitor->setStatus(201); |
| 41 |
|
} |
| 42 |
|
} |
| 43 |
|
|
eZ/Publish/Core/REST/Server/Output/ValueObjectVisitor/CreatedObjectStateGroup.php 1 location
|
@@ 21-42 (lines=22) @@
|
| 18 |
|
* |
| 19 |
|
* @todo coverage add unit test |
| 20 |
|
*/ |
| 21 |
|
class CreatedObjectStateGroup extends ObjectStateGroup |
| 22 |
|
{ |
| 23 |
|
/** |
| 24 |
|
* Visit struct returned by controllers. |
| 25 |
|
* |
| 26 |
|
* @param \eZ\Publish\Core\REST\Common\Output\Visitor $visitor |
| 27 |
|
* @param \eZ\Publish\Core\REST\Common\Output\Generator $generator |
| 28 |
|
* @param \eZ\Publish\Core\REST\Server\Values\CreatedObjectStateGroup $data |
| 29 |
|
*/ |
| 30 |
|
public function visit(Visitor $visitor, Generator $generator, $data) |
| 31 |
|
{ |
| 32 |
|
parent::visit($visitor, $generator, $data->objectStateGroup); |
| 33 |
|
$visitor->setHeader( |
| 34 |
|
'Location', |
| 35 |
|
$this->router->generate( |
| 36 |
|
'ezpublish_rest_loadObjectStateGroup', |
| 37 |
|
array('objectStateGroupId' => $data->objectStateGroup->id) |
| 38 |
|
) |
| 39 |
|
); |
| 40 |
|
$visitor->setStatus(201); |
| 41 |
|
} |
| 42 |
|
} |
| 43 |
|
|
eZ/Publish/Core/REST/Server/Output/ValueObjectVisitor/CreatedPolicy.php 1 location
|
@@ 21-45 (lines=25) @@
|
| 18 |
|
* |
| 19 |
|
* @todo coverage add unit test |
| 20 |
|
*/ |
| 21 |
|
class CreatedPolicy extends Policy |
| 22 |
|
{ |
| 23 |
|
/** |
| 24 |
|
* Visit struct returned by controllers. |
| 25 |
|
* |
| 26 |
|
* @param \eZ\Publish\Core\REST\Common\Output\Visitor $visitor |
| 27 |
|
* @param \eZ\Publish\Core\REST\Common\Output\Generator $generator |
| 28 |
|
* @param \eZ\Publish\Core\REST\Server\Values\CreatedPolicy $data |
| 29 |
|
*/ |
| 30 |
|
public function visit(Visitor $visitor, Generator $generator, $data) |
| 31 |
|
{ |
| 32 |
|
parent::visit($visitor, $generator, $data->policy); |
| 33 |
|
$visitor->setHeader( |
| 34 |
|
'Location', |
| 35 |
|
$this->router->generate( |
| 36 |
|
'ezpublish_rest_loadPolicy', |
| 37 |
|
array( |
| 38 |
|
'roleId' => $data->policy->roleId, |
| 39 |
|
'policyId' => $data->policy->id, |
| 40 |
|
) |
| 41 |
|
) |
| 42 |
|
); |
| 43 |
|
$visitor->setStatus(201); |
| 44 |
|
} |
| 45 |
|
} |
| 46 |
|
|
eZ/Publish/Core/REST/Server/Output/ValueObjectVisitor/CreatedRole.php 1 location
|
@@ 21-42 (lines=22) @@
|
| 18 |
|
* |
| 19 |
|
* @todo coverage add unit test |
| 20 |
|
*/ |
| 21 |
|
class CreatedRole extends Role |
| 22 |
|
{ |
| 23 |
|
/** |
| 24 |
|
* Visit struct returned by controllers. |
| 25 |
|
* |
| 26 |
|
* @param \eZ\Publish\Core\REST\Common\Output\Visitor $visitor |
| 27 |
|
* @param \eZ\Publish\Core\REST\Common\Output\Generator $generator |
| 28 |
|
* @param \eZ\Publish\Core\REST\Server\Values\CreatedRole $data |
| 29 |
|
*/ |
| 30 |
|
public function visit(Visitor $visitor, Generator $generator, $data) |
| 31 |
|
{ |
| 32 |
|
parent::visit($visitor, $generator, $data->role); |
| 33 |
|
$visitor->setHeader( |
| 34 |
|
'Location', |
| 35 |
|
$this->router->generate( |
| 36 |
|
'ezpublish_rest_loadRole', |
| 37 |
|
array('roleId' => $data->role->id) |
| 38 |
|
) |
| 39 |
|
); |
| 40 |
|
$visitor->setStatus(201); |
| 41 |
|
} |
| 42 |
|
} |
| 43 |
|
|
eZ/Publish/Core/REST/Server/Output/ValueObjectVisitor/CreatedSection.php 1 location
|
@@ 21-42 (lines=22) @@
|
| 18 |
|
* |
| 19 |
|
* @todo coverage add unit test |
| 20 |
|
*/ |
| 21 |
|
class CreatedSection extends Section |
| 22 |
|
{ |
| 23 |
|
/** |
| 24 |
|
* Visit struct returned by controllers. |
| 25 |
|
* |
| 26 |
|
* @param \eZ\Publish\Core\REST\Common\Output\Visitor $visitor |
| 27 |
|
* @param \eZ\Publish\Core\REST\Common\Output\Generator $generator |
| 28 |
|
* @param \eZ\Publish\Core\REST\Server\Values\CreatedSection $data |
| 29 |
|
*/ |
| 30 |
|
public function visit(Visitor $visitor, Generator $generator, $data) |
| 31 |
|
{ |
| 32 |
|
parent::visit($visitor, $generator, $data->section); |
| 33 |
|
$visitor->setHeader( |
| 34 |
|
'Location', |
| 35 |
|
$this->router->generate( |
| 36 |
|
'ezpublish_rest_loadSection', |
| 37 |
|
array('sectionId' => $data->section->id) |
| 38 |
|
) |
| 39 |
|
); |
| 40 |
|
$visitor->setStatus(201); |
| 41 |
|
} |
| 42 |
|
} |
| 43 |
|
|
eZ/Publish/Core/REST/Server/Output/ValueObjectVisitor/CreatedURLAlias.php 1 location
|
@@ 21-42 (lines=22) @@
|
| 18 |
|
* |
| 19 |
|
* @todo coverage add unit test |
| 20 |
|
*/ |
| 21 |
|
class CreatedURLAlias extends URLAlias |
| 22 |
|
{ |
| 23 |
|
/** |
| 24 |
|
* Visit struct returned by controllers. |
| 25 |
|
* |
| 26 |
|
* @param \eZ\Publish\Core\REST\Common\Output\Visitor $visitor |
| 27 |
|
* @param \eZ\Publish\Core\REST\Common\Output\Generator $generator |
| 28 |
|
* @param \eZ\Publish\Core\REST\Server\Values\CreatedURLAlias $data |
| 29 |
|
*/ |
| 30 |
|
public function visit(Visitor $visitor, Generator $generator, $data) |
| 31 |
|
{ |
| 32 |
|
parent::visit($visitor, $generator, $data->urlAlias); |
| 33 |
|
$visitor->setHeader( |
| 34 |
|
'Location', |
| 35 |
|
$this->router->generate( |
| 36 |
|
'ezpublish_rest_loadURLAlias', |
| 37 |
|
array('urlAliasId' => $data->urlAlias->id) |
| 38 |
|
) |
| 39 |
|
); |
| 40 |
|
$visitor->setStatus(201); |
| 41 |
|
} |
| 42 |
|
} |
| 43 |
|
|
eZ/Publish/Core/REST/Server/Output/ValueObjectVisitor/CreatedURLWildcard.php 1 location
|
@@ 21-42 (lines=22) @@
|
| 18 |
|
* |
| 19 |
|
* @todo coverage add unit test |
| 20 |
|
*/ |
| 21 |
|
class CreatedURLWildcard extends URLWildcard |
| 22 |
|
{ |
| 23 |
|
/** |
| 24 |
|
* Visit struct returned by controllers. |
| 25 |
|
* |
| 26 |
|
* @param \eZ\Publish\Core\REST\Common\Output\Visitor $visitor |
| 27 |
|
* @param \eZ\Publish\Core\REST\Common\Output\Generator $generator |
| 28 |
|
* @param \eZ\Publish\Core\REST\Server\Values\CreatedURLWildcard $data |
| 29 |
|
*/ |
| 30 |
|
public function visit(Visitor $visitor, Generator $generator, $data) |
| 31 |
|
{ |
| 32 |
|
parent::visit($visitor, $generator, $data->urlWildcard); |
| 33 |
|
$visitor->setHeader( |
| 34 |
|
'Location', |
| 35 |
|
$this->router->generate( |
| 36 |
|
'ezpublish_rest_loadURLWildcard', |
| 37 |
|
array('urlWildcardId' => $data->urlWildcard->id) |
| 38 |
|
) |
| 39 |
|
); |
| 40 |
|
$visitor->setStatus(201); |
| 41 |
|
} |
| 42 |
|
} |
| 43 |
|
|
eZ/Publish/Core/REST/Server/Output/ValueObjectVisitor/CreatedUser.php 1 location
|
@@ 21-42 (lines=22) @@
|
| 18 |
|
* |
| 19 |
|
* @todo coverage add unit test |
| 20 |
|
*/ |
| 21 |
|
class CreatedUser extends RestUser |
| 22 |
|
{ |
| 23 |
|
/** |
| 24 |
|
* Visit struct returned by controllers. |
| 25 |
|
* |
| 26 |
|
* @param \eZ\Publish\Core\REST\Common\Output\Visitor $visitor |
| 27 |
|
* @param \eZ\Publish\Core\REST\Common\Output\Generator $generator |
| 28 |
|
* @param \eZ\Publish\Core\REST\Server\Values\CreatedUser $data |
| 29 |
|
*/ |
| 30 |
|
public function visit(Visitor $visitor, Generator $generator, $data) |
| 31 |
|
{ |
| 32 |
|
parent::visit($visitor, $generator, $data->user); |
| 33 |
|
$visitor->setHeader( |
| 34 |
|
'Location', |
| 35 |
|
$this->router->generate( |
| 36 |
|
'ezpublish_rest_loadUser', |
| 37 |
|
array('userId' => $data->user->contentInfo->id) |
| 38 |
|
) |
| 39 |
|
); |
| 40 |
|
$visitor->setStatus(201); |
| 41 |
|
} |
| 42 |
|
} |
| 43 |
|
|
eZ/Publish/Core/REST/Server/Output/ValueObjectVisitor/CreatedUserGroup.php 1 location
|
@@ 21-42 (lines=22) @@
|
| 18 |
|
* |
| 19 |
|
* @todo coverage add unit test |
| 20 |
|
*/ |
| 21 |
|
class CreatedUserGroup extends RestUserGroup |
| 22 |
|
{ |
| 23 |
|
/** |
| 24 |
|
* Visit struct returned by controllers. |
| 25 |
|
* |
| 26 |
|
* @param \eZ\Publish\Core\REST\Common\Output\Visitor $visitor |
| 27 |
|
* @param \eZ\Publish\Core\REST\Common\Output\Generator $generator |
| 28 |
|
* @param \eZ\Publish\Core\REST\Server\Values\CreatedUserGroup $data |
| 29 |
|
*/ |
| 30 |
|
public function visit(Visitor $visitor, Generator $generator, $data) |
| 31 |
|
{ |
| 32 |
|
parent::visit($visitor, $generator, $data->userGroup); |
| 33 |
|
$visitor->setHeader( |
| 34 |
|
'Location', |
| 35 |
|
$this->router->generate( |
| 36 |
|
'ezpublish_rest_loadUserGroup', |
| 37 |
|
array('groupPath' => trim($data->userGroup->mainLocation->pathString, '/')) |
| 38 |
|
) |
| 39 |
|
); |
| 40 |
|
$visitor->setStatus(201); |
| 41 |
|
} |
| 42 |
|
} |
| 43 |
|
|
eZ/Publish/Core/REST/Server/Output/ValueObjectVisitor/PublishedRole.php 1 location
|
@@ 21-42 (lines=22) @@
|
| 18 |
|
* |
| 19 |
|
* @todo coverage add unit test |
| 20 |
|
*/ |
| 21 |
|
class PublishedRole extends Role |
| 22 |
|
{ |
| 23 |
|
/** |
| 24 |
|
* Visit struct returned by controllers. |
| 25 |
|
* |
| 26 |
|
* @param \eZ\Publish\Core\REST\Common\Output\Visitor $visitor |
| 27 |
|
* @param \eZ\Publish\Core\REST\Common\Output\Generator $generator |
| 28 |
|
* @param \eZ\Publish\Core\REST\Server\Values\PublishedRole $data |
| 29 |
|
*/ |
| 30 |
|
public function visit(Visitor $visitor, Generator $generator, $data) |
| 31 |
|
{ |
| 32 |
|
parent::visit($visitor, $generator, $data->role); |
| 33 |
|
$visitor->setHeader( |
| 34 |
|
'Location', |
| 35 |
|
$this->router->generate( |
| 36 |
|
'ezpublish_rest_loadRole', |
| 37 |
|
array('roleId' => $data->role->id) |
| 38 |
|
) |
| 39 |
|
); |
| 40 |
|
$visitor->setStatus(204); |
| 41 |
|
} |
| 42 |
|
} |
| 43 |
|
|