From f721963a58266247f12b67ddb57a003ff2a6ebae Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Tue, 29 Apr 2014 17:48:11 +0200 Subject: [PATCH] use phpcr-odm interface to avoid core bundle dependency --- Doctrine/Phpcr/RedirectRoute.php | 9 +++++++-- Doctrine/Phpcr/Route.php | 6 +++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Doctrine/Phpcr/RedirectRoute.php b/Doctrine/Phpcr/RedirectRoute.php index 0df560f7..3e89bd22 100644 --- a/Doctrine/Phpcr/RedirectRoute.php +++ b/Doctrine/Phpcr/RedirectRoute.php @@ -12,9 +12,9 @@ namespace Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr; use Doctrine\Common\Collections\Collection; +use Doctrine\ODM\PHPCR\HierarchyInterface; use Symfony\Cmf\Bundle\RoutingBundle\Model\RedirectRoute as RedirectRouteModel; use Symfony\Cmf\Component\Routing\RouteObjectInterface; -use Symfony\Cmf\Bundle\CoreBundle\Model\ChildInterface; /** * {@inheritDoc} @@ -22,7 +22,7 @@ * This extends the RedirectRoute Model. We need to re-implement everything * that the PHPCR Route document adds. */ -class RedirectRoute extends RedirectRouteModel implements PrefixInterface, ChildInterface +class RedirectRoute extends RedirectRouteModel implements PrefixInterface, HierarchyInterface { /** * parent document @@ -92,6 +92,8 @@ public function getParent() * Note that this will change the URL this route matches. * * @param object $parent the new parent document + * + * @return $this */ public function setParentDocument($parent) { @@ -100,6 +102,9 @@ public function setParentDocument($parent) return $this; } + /** + * {@inheritDoc} + */ public function getParentDocument() { return $this->parent; diff --git a/Doctrine/Phpcr/Route.php b/Doctrine/Phpcr/Route.php index 70740a52..ca817337 100644 --- a/Doctrine/Phpcr/Route.php +++ b/Doctrine/Phpcr/Route.php @@ -13,9 +13,9 @@ use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; +use Doctrine\ODM\PHPCR\HierarchyInterface; use Doctrine\ODM\PHPCR\Document\Generic; use Doctrine\ODM\PHPCR\Exception\InvalidArgumentException; -use Symfony\Cmf\Bundle\CoreBundle\Model\ChildInterface; use Symfony\Cmf\Component\Routing\RouteObjectInterface; use Symfony\Cmf\Bundle\RoutingBundle\Model\Route as RouteModel; @@ -25,7 +25,7 @@ * * @author david.buchmann@liip.ch */ -class Route extends RouteModel implements PrefixInterface, ChildInterface +class Route extends RouteModel implements PrefixInterface, HierarchyInterface { /** * parent document @@ -128,7 +128,7 @@ public function setParentDocument($parent) * The parent document, which might be another route or some other * document. * - * @return Generic object + * @return object The parent document */ public function getParentDocument() {