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())
144
144
if ($ this ->container ->isFrozen ()) {
145
145
$ code .= $ this ->addFrozenConstructor ();
146
146
$ code .= $ this ->addFrozenCompile ();
147
+ $ code .= $ this ->addIsFrozenMethod ();
147
148
} else {
148
149
$ code .= $ this ->addConstructor ();
149
150
}
@@ -957,6 +958,26 @@ public function compile()
957
958
throw new LogicException('You cannot compile a dumped frozen container.');
958
959
}
959
960
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
+
960
981
EOF ;
961
982
}
962
983
Original file line number Diff line number Diff line change @@ -46,6 +46,14 @@ public function compile()
46
46
throw new LogicException ('You cannot compile a dumped frozen container. ' );
47
47
}
48
48
49
+ /**
50
+ * {@inheritdoc}
51
+ */
52
+ public function isFrozen ()
53
+ {
54
+ return true ;
55
+ }
56
+
49
57
/**
50
58
* Gets the 'test' service.
51
59
*
Original file line number Diff line number Diff line change @@ -50,6 +50,14 @@ public function compile()
50
50
throw new LogicException ('You cannot compile a dumped frozen container. ' );
51
51
}
52
52
53
+ /**
54
+ * {@inheritdoc}
55
+ */
56
+ public function isFrozen ()
57
+ {
58
+ return true ;
59
+ }
60
+
53
61
/**
54
62
* Gets the 'test' service.
55
63
*
Original file line number Diff line number Diff line change @@ -44,6 +44,14 @@ public function compile()
44
44
throw new LogicException ('You cannot compile a dumped frozen container. ' );
45
45
}
46
46
47
+ /**
48
+ * {@inheritdoc}
49
+ */
50
+ public function isFrozen ()
51
+ {
52
+ return true ;
53
+ }
54
+
47
55
/**
48
56
* Gets the 'bar' service.
49
57
*
Original file line number Diff line number Diff line change @@ -62,6 +62,14 @@ public function compile()
62
62
throw new LogicException ('You cannot compile a dumped frozen container. ' );
63
63
}
64
64
65
+ /**
66
+ * {@inheritdoc}
67
+ */
68
+ public function isFrozen ()
69
+ {
70
+ return true ;
71
+ }
72
+
65
73
/**
66
74
* Gets the 'bar' service.
67
75
*
You can’t perform that action at this time.
0 commit comments