Skip to content

Commit a91a77b

Browse files
committed
Fixed tests and documented id
1 parent 92420ab commit a91a77b

File tree

2 files changed

+53
-6
lines changed

2 files changed

+53
-6
lines changed

Doctrine/Orm/ContentRepository.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ protected function getModelAndId($identifier)
2626

2727
/**
2828
* {@inheritDoc}
29+
*
30+
* @param string $id The ID contains both model name and id, seperated by a colon.
31+
* The model name must not contain a colon. For instance, "Acme\Content:12"
32+
* tries to find the Acme\Content object where id = 12
2933
*/
3034
public function findById($id)
3135
{

Doctrine/Orm/Route.php

Lines changed: 49 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,61 @@
55
use Symfony\Cmf\Bundle\RoutingBundle\Model\Route as RouteModel;
66

77
/**
8-
* ORM route version.
9-
* @author matteo caberlotto [email protected]
8+
* The ORM route version.
9+
*
10+
* @author matteo caberlotto <[email protected]>
11+
* @author Wouter J <[email protected]>
1012
*/
1113
class Route extends RouteModel
1214
{
15+
protected $name;
16+
protected $position = 0;
17+
1318
/**
14-
* {@inheritDoc}
19+
* Sets the name.
20+
*
21+
* @param string $name
22+
*
23+
* @return self
1524
*/
16-
protected $name;
25+
public function setName($name)
26+
{
27+
$this->name = $name;
28+
29+
return $this;
30+
}
31+
32+
/**
33+
* Gets the name.
34+
*
35+
* @return string
36+
*/
37+
public function getName()
38+
{
39+
return $this->name;
40+
}
41+
42+
/**
43+
* Sets the position.
44+
*
45+
* @param int $position
46+
*
47+
* @return self
48+
*/
49+
public function setPosition($position)
50+
{
51+
$this->position = $position;
52+
53+
return $this;
54+
}
1755

1856
/**
19-
* {@inheritDoc}
57+
* Gets the position.
58+
*
59+
* @return int
2060
*/
21-
protected $position;
61+
public function getPosition()
62+
{
63+
return $this->position;
64+
}
2265
}

0 commit comments

Comments
 (0)