@@ -34,6 +34,10 @@ abstract class RouteMapAbstract extends DataIterator implements RouteMapInterfac
3434 * @var ContainerInterface
3535 */
3636 protected $ container ;
37+ /**
38+ * @var bool
39+ */
40+ protected $ deprecated = false ;
3741 /**
3842 * @var string
3943 */
@@ -62,6 +66,16 @@ final public function __construct(ContainerInterface $container)
6266 $ this ->initialize ();
6367 }
6468
69+ /**
70+ * @inheritdoc
71+ */
72+ public function deprecated ()
73+ {
74+ $ this ->deprecated = true ;
75+
76+ return $ this ;
77+ }
78+
6579 /**
6680 * @inheritdoc
6781 */
@@ -86,6 +100,28 @@ public function getPackage()
86100 return ($ this ->isSubResourceOfPackage ()) ? $ this ->packageName : $ this ->resourceName ;
87101 }
88102
103+ /**
104+ * @return string
105+ */
106+ public function getResource ()
107+ {
108+ return $ this ->resourceName ;
109+ }
110+
111+ public function hasPackage ()
112+ {
113+ return null !== $ this ->packageName ;
114+ }
115+
116+ public function isSubResourceOfPackage ()
117+ {
118+ if (!$ this ->hasPackage ()) {
119+ return false ;
120+ }
121+
122+ return $ this ->resourceName !== $ this ->packageName ;
123+ }
124+
89125 final public function registerRoutes (RouterInterface $ router )
90126 {
91127 foreach ($ this ->data as $ Route ) {
@@ -199,20 +235,6 @@ final protected function put($pattern)
199235 return $ this ->add (Route::PUT , $ pattern );
200236 }
201237
202- private function hasPackage ()
203- {
204- return null !== $ this ->packageName ;
205- }
206-
207- private function isSubResourceOfPackage ()
208- {
209- if (!$ this ->hasPackage ()) {
210- return false ;
211- }
212-
213- return $ this ->resourceName !== $ this ->packageName ;
214- }
215-
216238 /**
217239 * @param $routeName
218240 *
0 commit comments