|
@@ 1107-1111 (lines=5) @@
|
| 1104 |
|
*/ |
| 1105 |
|
public function addStack($blockName, array $args = array()) |
| 1106 |
|
{ |
| 1107 |
|
if (isset($this->plugins[$blockName])) { |
| 1108 |
|
$class = $this->plugins[$blockName]['class']; |
| 1109 |
|
} else { |
| 1110 |
|
$class = self::NAMESPACE_PLUGINS_BLOCKS . 'Plugin' . self::toCamelCase($blockName); |
| 1111 |
|
} |
| 1112 |
|
|
| 1113 |
|
if ($this->curBlock !== null) { |
| 1114 |
|
$this->curBlock->buffer(ob_get_contents()); |
|
@@ 1188-1193 (lines=6) @@
|
| 1185 |
|
*/ |
| 1186 |
|
public function findBlock($type) |
| 1187 |
|
{ |
| 1188 |
|
if (isset($this->plugins[$type])) { |
| 1189 |
|
$type = $this->plugins[$type]['class']; |
| 1190 |
|
} else { |
| 1191 |
|
$type = self::NAMESPACE_PLUGINS_BLOCKS . 'Plugin_' . str_replace(self::NAMESPACE_PLUGINS_BLOCKS.'Plugin', |
| 1192 |
|
'', $type); |
| 1193 |
|
} |
| 1194 |
|
|
| 1195 |
|
$keys = array_keys($this->stack); |
| 1196 |
|
while (($key = array_pop($keys)) !== false) { |