Skip to content

Commit 2b9900f

Browse files
committed
Merge pull request #247 from symfony-cmf/remove-corebundle-dep
use phpcr-odm interface to avoid core bundle dependency
2 parents dd4e6a8 + f721963 commit 2b9900f

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

Doctrine/Phpcr/RedirectRoute.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@
1212
namespace Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr;
1313

1414
use Doctrine\Common\Collections\Collection;
15+
use Doctrine\ODM\PHPCR\HierarchyInterface;
1516
use Symfony\Cmf\Bundle\RoutingBundle\Model\RedirectRoute as RedirectRouteModel;
1617
use Symfony\Cmf\Component\Routing\RouteObjectInterface;
17-
use Symfony\Cmf\Bundle\CoreBundle\Model\ChildInterface;
1818

1919
/**
2020
* {@inheritDoc}
2121
*
2222
* This extends the RedirectRoute Model. We need to re-implement everything
2323
* that the PHPCR Route document adds.
2424
*/
25-
class RedirectRoute extends RedirectRouteModel implements PrefixInterface, ChildInterface
25+
class RedirectRoute extends RedirectRouteModel implements PrefixInterface, HierarchyInterface
2626
{
2727
/**
2828
* parent document
@@ -92,6 +92,8 @@ public function getParent()
9292
* Note that this will change the URL this route matches.
9393
*
9494
* @param object $parent the new parent document
95+
*
96+
* @return $this
9597
*/
9698
public function setParentDocument($parent)
9799
{
@@ -100,6 +102,9 @@ public function setParentDocument($parent)
100102
return $this;
101103
}
102104

105+
/**
106+
* {@inheritDoc}
107+
*/
103108
public function getParentDocument()
104109
{
105110
return $this->parent;

Doctrine/Phpcr/Route.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313

1414
use Doctrine\Common\Collections\ArrayCollection;
1515
use Doctrine\Common\Collections\Collection;
16+
use Doctrine\ODM\PHPCR\HierarchyInterface;
1617
use Doctrine\ODM\PHPCR\Document\Generic;
1718
use Doctrine\ODM\PHPCR\Exception\InvalidArgumentException;
18-
use Symfony\Cmf\Bundle\CoreBundle\Model\ChildInterface;
1919
use Symfony\Cmf\Component\Routing\RouteObjectInterface;
2020
use Symfony\Cmf\Bundle\RoutingBundle\Model\Route as RouteModel;
2121

@@ -25,7 +25,7 @@
2525
*
2626
2727
*/
28-
class Route extends RouteModel implements PrefixInterface, ChildInterface
28+
class Route extends RouteModel implements PrefixInterface, HierarchyInterface
2929
{
3030
/**
3131
* parent document
@@ -128,7 +128,7 @@ public function setParentDocument($parent)
128128
* The parent document, which might be another route or some other
129129
* document.
130130
*
131-
* @return Generic object
131+
* @return object The parent document
132132
*/
133133
public function getParentDocument()
134134
{

0 commit comments

Comments
 (0)