File tree Expand file tree Collapse file tree 5 files changed +53
-0
lines changed Expand file tree Collapse file tree 5 files changed +53
-0
lines changed Original file line number Diff line number Diff line change @@ -144,6 +144,7 @@ public function dump(array $options = array())
144144 if ($ this ->container ->isFrozen ()) {
145145 $ code .= $ this ->addFrozenConstructor ();
146146 $ code .= $ this ->addFrozenCompile ();
147+ $ code .= $ this ->addIsFrozenMethod ();
147148 } else {
148149 $ code .= $ this ->addConstructor ();
149150 }
@@ -957,6 +958,26 @@ public function compile()
957958 throw new LogicException('You cannot compile a dumped frozen container.');
958959 }
959960
961+ EOF ;
962+ }
963+
964+ /**
965+ * Adds the isFrozen method for a frozen container.
966+ *
967+ * @return string
968+ */
969+ private function addIsFrozenMethod ()
970+ {
971+ return <<<EOF
972+
973+ /* {$ this ->docStar }
974+ * {@inheritdoc}
975+ */
976+ public function isFrozen()
977+ {
978+ return true;
979+ }
980+
960981EOF ;
961982 }
962983
Original file line number Diff line number Diff line change @@ -46,6 +46,14 @@ public function compile()
4646 throw new LogicException ('You cannot compile a dumped frozen container. ' );
4747 }
4848
49+ /**
50+ * {@inheritdoc}
51+ */
52+ public function isFrozen ()
53+ {
54+ return true ;
55+ }
56+
4957 /**
5058 * Gets the 'test' service.
5159 *
Original file line number Diff line number Diff line change @@ -50,6 +50,14 @@ public function compile()
5050 throw new LogicException ('You cannot compile a dumped frozen container. ' );
5151 }
5252
53+ /**
54+ * {@inheritdoc}
55+ */
56+ public function isFrozen ()
57+ {
58+ return true ;
59+ }
60+
5361 /**
5462 * Gets the 'test' service.
5563 *
Original file line number Diff line number Diff line change @@ -44,6 +44,14 @@ public function compile()
4444 throw new LogicException ('You cannot compile a dumped frozen container. ' );
4545 }
4646
47+ /**
48+ * {@inheritdoc}
49+ */
50+ public function isFrozen ()
51+ {
52+ return true ;
53+ }
54+
4755 /**
4856 * Gets the 'bar' service.
4957 *
Original file line number Diff line number Diff line change @@ -62,6 +62,14 @@ public function compile()
6262 throw new LogicException ('You cannot compile a dumped frozen container. ' );
6363 }
6464
65+ /**
66+ * {@inheritdoc}
67+ */
68+ public function isFrozen ()
69+ {
70+ return true ;
71+ }
72+
6573 /**
6674 * Gets the 'bar' service.
6775 *
You can’t perform that action at this time.
0 commit comments