Fix bug in style changes for the Use cases on the live site.
[yaffs-website] / vendor / symfony-cmf / routing / ContentRepositoryInterface.php
1 <?php
2
3 /*
4  * This file is part of the Symfony CMF package.
5  *
6  * (c) 2011-2015 Symfony CMF
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 namespace Symfony\Cmf\Component\Routing;
13
14 /**
15  * Interface used by the DynamicRouter to retrieve content by it's id when
16  * generating routes from content-id.
17  *
18  * This can be easily implemented using i.e. the Doctrine PHPCR-ODM
19  * DocumentManager.
20  *
21  * @author Uwe Jäger
22  */
23 interface ContentRepositoryInterface
24 {
25     /**
26      * Return a content object by it's id or null if there is none.
27      *
28      * If the returned content implements RouteReferrersReadInterface, it will
29      * be used to get the route from it to generate an URL.
30      *
31      * @param string $id id of the content object
32      *
33      * @return object A content that matches this id.
34      */
35     public function findById($id);
36
37     /**
38      * Return the content identifier for the provided content object for
39      * debugging purposes.
40      *
41      * @param object $content A content instance
42      *
43      * @return string|null $id id of the content object or null if unable to determine an id
44      */
45     public function getContentId($content);
46 }