Skip to content

Commit

Permalink
Merge pull request #247 from symfony-cmf/remove-corebundle-dep
Browse files Browse the repository at this point in the history
use phpcr-odm interface to avoid core bundle dependency
  • Loading branch information
dbu committed Apr 30, 2014
2 parents dd4e6a8 + f721963 commit 2b9900f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
9 changes: 7 additions & 2 deletions Doctrine/Phpcr/RedirectRoute.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
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}
*
* 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
Expand Down Expand Up @@ -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)
{
Expand All @@ -100,6 +102,9 @@ public function setParentDocument($parent)
return $this;
}

/**
* {@inheritDoc}
*/
public function getParentDocument()
{
return $this->parent;
Expand Down
6 changes: 3 additions & 3 deletions Doctrine/Phpcr/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -25,7 +25,7 @@
*
* @author [email protected]
*/
class Route extends RouteModel implements PrefixInterface, ChildInterface
class Route extends RouteModel implements PrefixInterface, HierarchyInterface
{
/**
* parent document
Expand Down Expand Up @@ -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()
{
Expand Down

0 comments on commit 2b9900f

Please sign in to comment.