| @@ 498-506 (lines=9) @@ | ||
| 495 | */ |
|
| 496 | public function getDecorator($name, $position = false) |
|
| 497 | {
|
|
| 498 | if ($position) {
|
|
| 499 | return $this->_decorators[$position][$name]; |
|
| 500 | } else {
|
|
| 501 | foreach ($this->_decorators as $position => $decorators) {
|
|
| 502 | if (isset($decorators[$name])) {
|
|
| 503 | return $decorators[$name]; |
|
| 504 | } |
|
| 505 | } |
|
| 506 | } |
|
| 507 | ||
| 508 | return false; |
|
| 509 | } |
|
| @@ 518-527 (lines=10) @@ | ||
| 515 | */ |
|
| 516 | public function removeDecorator($name, $position = false) |
|
| 517 | {
|
|
| 518 | if ($position) {
|
|
| 519 | unset ($this->_decorators[$position][$name]); |
|
| 520 | } else {
|
|
| 521 | foreach ($this->_decorators as $position => $decorators) {
|
|
| 522 | if (isset($decorators[$name])) {
|
|
| 523 | unset($decorators[$name]); |
|
| 524 | ||
| 525 | return $this; |
|
| 526 | } |
|
| 527 | } |
|
| 528 | } |
|
| 529 | ||
| 530 | return $this; |
|