This repository was archived by the owner on Sep 16, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 10 files changed +16
-19
lines changed Expand file tree Collapse file tree 10 files changed +16
-19
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace Symfony \Cmf \Bundle \RoutingAutoBundle \AutoRoute ;
4
4
5
- use Symfony \Cmf \Bundle \RoutingBundle \Document \Route ;
6
-
7
5
/**
8
6
* This class might better be called AutoRouteRequest.
9
7
* It holds all the RouteStack objects and the content document.
16
14
*/
17
15
class BuilderContext
18
16
{
17
+ /** @var RouteStack[] */
19
18
protected $ routeStacks = array ();
19
+ /** @var RouteStack */
20
20
protected $ stagedRouteStack ;
21
21
protected $ content ;
22
22
@@ -47,7 +47,7 @@ public function stageRouteStack(RouteStack $routeStack)
47
47
}
48
48
49
49
/**
50
- * As with above. This can probably be replaced with something
50
+ * As with above. This can probably be replaced with something
51
51
* simpler.
52
52
*/
53
53
public function commitRouteStack ()
Original file line number Diff line number Diff line change 2
2
3
3
namespace Symfony \Cmf \Bundle \RoutingAutoBundle \AutoRoute ;
4
4
5
- use Symfony \Cmf \Bundle \RoutingBundle \Document \Route ;
6
-
7
5
/**
8
6
* The job of classes implementing this interface is to add
9
7
* a Route for each path element in the given RouteStack.
Original file line number Diff line number Diff line change 8
8
use Symfony \Cmf \Bundle \RoutingAutoBundle \AutoRoute \RouteStack ;
9
9
use Symfony \Cmf \Bundle \CoreBundle \Slugifier \SlugifierInterface ;
10
10
use Doctrine \ODM \PHPCR \DocumentManager ;
11
- use Symfony \Cmf \Bundle \RoutingBundle \Document \Route ;
11
+ use Symfony \Cmf \Bundle \RoutingBundle \Doctrine \ Phpcr \Route ;
12
12
use Doctrine \Common \Collections \ArrayCollection ;
13
13
14
14
/**
@@ -75,7 +75,7 @@ public function providePath(RouteStack $routeStack)
75
75
76
76
// Now check to see if there are any scheduled routes
77
77
// I think this should be handled by the ODM ...
78
-
78
+
79
79
$ uow = $ this ->dm ->getUnitOfWork ();
80
80
$ scheduledInserts = $ uow ->getScheduledInserts ();
81
81
$ scheduledRoutes = array_filter ($ scheduledInserts , $ routeFilter );
Original file line number Diff line number Diff line change 6
6
use Doctrine \ODM \PHPCR \DocumentManager ;
7
7
use Doctrine \ODM \PHPCR \Document \Generic ;
8
8
use Symfony \Cmf \Bundle \RoutingAutoBundle \AutoRoute \RouteStack ;
9
- use Symfony \Cmf \Bundle \RoutingAutoBundle \AutoRoute \Exception \MissingOptionException ;
10
- use Symfony \Cmf \Bundle \RoutingBundle \Document \Route ;
9
+ use Symfony \Cmf \Bundle \RoutingBundle \Doctrine \Phpcr \Route ;
11
10
12
11
/**
13
12
* This class will make the Route classes using
Original file line number Diff line number Diff line change 2
2
3
3
namespace Symfony \Cmf \Bundle \RoutingAutoBundle \Document ;
4
4
5
- use Symfony \Cmf \Bundle \RoutingBundle \Document \Route ;
5
+ use Symfony \Cmf \Bundle \RoutingBundle \Doctrine \ Phpcr \Route ;
6
6
7
7
/**
8
8
* Sub class of Route to enable automatically generated routes
Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ class Blog
19
19
20
20
/**
21
21
* @PHPCR\Referrers(
22
- * referringDocument="Symfony\Cmf\Bundle\RoutingBundle\Document\ Route",
23
- * referencedBy="routeContent "
22
+ * referringDocument="Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\ Route",
23
+ * referencedBy="content "
24
24
* )
25
25
*/
26
26
public $ routes ;
Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ class Post
19
19
20
20
/**
21
21
* @PHPCR\Referrers(
22
- * referringDocument="Symfony\Cmf\Bundle\RoutingBundle\Document\ Route",
23
- * referencedBy="routeContent "
22
+ * referringDocument="Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\ Route",
23
+ * referencedBy="content "
24
24
* )
25
25
*/
26
26
public $ routes ;
Original file line number Diff line number Diff line change @@ -23,10 +23,10 @@ public function setUp()
23
23
$ this ->builderContext = $ this ->getMock ('Symfony\Cmf\Bundle\RoutingAutoBundle\AutoRoute\BuilderContext ' );
24
24
25
25
$ this ->aiPath = new AutoIncrementPath ($ this ->dm , $ this ->routeMaker );
26
- $ this ->route1 = $ this ->getMockBuilder ('Symfony\Cmf\Bundle\RoutingBundle\Document \Route ' )
26
+ $ this ->route1 = $ this ->getMockBuilder ('Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr \Route ' )
27
27
->disableOriginalConstructor ()
28
28
->getMock ();
29
- $ this ->route2 = $ this ->getMockBuilder ('Symfony\Cmf\Bundle\RoutingBundle\Document \Route ' )
29
+ $ this ->route2 = $ this ->getMockBuilder ('Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr \Route ' )
30
30
->disableOriginalConstructor ()
31
31
->getMock ();
32
32
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ public function setUp()
35
35
->getMock ();
36
36
37
37
$ this ->contentObject = new \stdClass ;
38
- $ this ->route1 = $ this ->getMock ('Symfony\Cmf\Bundle\RoutingBundle\Document \Route ' );
38
+ $ this ->route1 = $ this ->getMock ('Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr \Route ' );
39
39
$ this ->object = new ContentObjectTestClass ($ this ->contentObject );
40
40
41
41
Original file line number Diff line number Diff line change 6
6
7
7
class RouteMakerTest extends GenericMakerTest
8
8
{
9
- protected $ routeClass = 'Symfony\Cmf\Bundle\RoutingBundle\Document \Route ' ;
9
+ protected $ routeClass = 'Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr \Route ' ;
10
10
protected $ makerClass = 'Symfony\Cmf\Bundle\RoutingAutoBundle\AutoRoute\RouteMaker\RouteMaker ' ;
11
11
12
12
public function testMake ()
@@ -30,7 +30,7 @@ public function testMake()
30
30
$ expected = array ('/test ' , '/test/foo ' );
31
31
32
32
$ test ->assertInstanceOf (
33
- ' Symfony\Cmf\Bundle\RoutingBundle\Document\Route ' ,
33
+ $ this -> routeClass ,
34
34
$ doc
35
35
);
36
36
You can’t perform that action at this time.
0 commit comments