lib/Dwoo/Plugins/Blocks/PluginFor.php 1 location
|
@@ 172-174 (lines=3) @@
|
| 169 |
|
if ($usesFirst) { |
| 170 |
|
$out .= "\n\t\t" . '$_for' . $cnt . '_glob["first"] = (string) ($_for' . $cnt . '_glob["iteration"] === 1);'; |
| 171 |
|
} |
| 172 |
|
if ($usesLast) { |
| 173 |
|
$out .= "\n\t\t" . '$_for' . $cnt . '_glob["last"] = (string) ($_for' . $cnt . '_glob["iteration"] === $_for' . $cnt . '_glob["total"]);'; |
| 174 |
|
} |
| 175 |
|
$out .= "\n/* -- for start output */\n" . Compiler::PHP_CLOSE; |
| 176 |
|
|
| 177 |
|
// build post processing output and cache it |
lib/Dwoo/Plugins/Blocks/PluginForeach.php 1 location
|
@@ 174-176 (lines=3) @@
|
| 171 |
|
if ($usesFirst) { |
| 172 |
|
$pre .= "\n\t\t" . '$_fh' . $cnt . '_glob["first"] = (string) ($_fh' . $cnt . '_glob["index"] === 0);'; |
| 173 |
|
} |
| 174 |
|
if ($usesLast) { |
| 175 |
|
$pre .= "\n\t\t" . '$_fh' . $cnt . '_glob["last"] = (string) ($_fh' . $cnt . '_glob["iteration"] === $_fh' . $cnt . '_glob["total"]);'; |
| 176 |
|
} |
| 177 |
|
$pre .= "\n/* -- foreach start output */\n" . Compiler::PHP_CLOSE; |
| 178 |
|
|
| 179 |
|
// build post content output |
lib/Dwoo/Plugins/Blocks/PluginLoop.php 1 location
|
@@ 148-150 (lines=3) @@
|
| 145 |
|
if ($usesFirst) { |
| 146 |
|
$pre .= "\n\t\t" . '$_loop' . $cnt . '_glob["first"] = (string) ($_loop' . $cnt . '_glob["index"] === 0);'; |
| 147 |
|
} |
| 148 |
|
if ($usesLast) { |
| 149 |
|
$pre .= "\n\t\t" . '$_loop' . $cnt . '_glob["last"] = (string) ($_loop' . $cnt . '_glob["iteration"] === $_loop' . $cnt . '_glob["total"]);'; |
| 150 |
|
} |
| 151 |
|
$pre .= "\n\t\t" . '$_loop' . $cnt . '_scope = $this->setScope(array("-loop-"));' . "\n/* -- loop start output */\n" . Compiler::PHP_CLOSE; |
| 152 |
|
|
| 153 |
|
// build post processing output and cache it |