改名
This commit is contained in:
@@ -51,8 +51,6 @@ class Service extends Component
|
|||||||
}
|
}
|
||||||
throw new ComponentException("Unknown component ID: $id");
|
throw new ComponentException("Unknown component ID: $id");
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_ids[] = $id;
|
|
||||||
if (isset($this->_definition[$id])) {
|
if (isset($this->_definition[$id])) {
|
||||||
$config = $this->_definition[$id];
|
$config = $this->_definition[$id];
|
||||||
if (is_object($config)) {
|
if (is_object($config)) {
|
||||||
@@ -88,6 +86,9 @@ class Service extends Component
|
|||||||
if ($definition === NULL) {
|
if ($definition === NULL) {
|
||||||
return $this->remove($id);
|
return $this->remove($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->_ids[] = $id;
|
||||||
|
|
||||||
unset($this->_components[$id]);
|
unset($this->_components[$id]);
|
||||||
if (is_object($definition) || is_callable($definition, TRUE)) {
|
if (is_object($definition) || is_callable($definition, TRUE)) {
|
||||||
return $this->_definition[$id] = $definition;
|
return $this->_definition[$id] = $definition;
|
||||||
|
|||||||
Reference in New Issue
Block a user