1: <?php
2:
3: namespace Charcoal\Object;
4:
5: /**
6: * Defines a route to an object implementing {@see \Charcoal\Object\RoutableInterface}.
7: *
8: * {@see \Charcoal\Object\ObjectRoute} for a basic implementation.
9: */
10: interface ObjectRouteInterface
11: {
12: /**
13: * Determine if the current slug is unique.
14: *
15: * @return boolean
16: */
17: public function isSlugUnique();
18:
19: /**
20: * Generate a unique URL slug for routable object.
21: *
22: * @return ObjectRouteInterface Chainable
23: */
24: public function generateUniqueSlug();
25:
26: /**
27: * Retrieve the object route URI.
28: *
29: * @return string
30: */
31: public function slug();
32:
33: /**
34: * Retrieve the locale of the object route.
35: *
36: * @return string
37: */
38: public function lang();
39:
40: /**
41: * Retrieve the foreign object type related to this route.
42: *
43: * @return string
44: */
45: public function routeObjType();
46:
47: /**
48: * Retrieve the foreign object ID related to this route.
49: *
50: * @return string
51: */
52: public function routeObjId();
53:
54: /**
55: * Retrieve the foreign object's template identifier.
56: *
57: * @return string
58: */
59: public function routeTemplate();
60: }
61: