Skip to content

Commit

Permalink
[#14213] - Fixed references
Browse files Browse the repository at this point in the history
  • Loading branch information
niden committed Jul 4, 2019
1 parent 648331f commit 070d355
Show file tree
Hide file tree
Showing 17 changed files with 22 additions and 10 deletions.
4 changes: 2 additions & 2 deletions tests/_data/fixtures/Mvc/View/Engine/Mustache.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

use Mustache_Engine;
use Phalcon\DiInterface;
use Phalcon\Mvc\View\Engine;
use Phalcon\Mvc\View\EngineInterface;
use Phalcon\Mvc\View\Engine\AbstractEngine;
use Phalcon\Mvc\View\Engine\EngineInterface;
use Phalcon\Mvc\ViewBaseInterface;

class Mustache extends Engine implements EngineInterface
Expand Down
1 change: 1 addition & 0 deletions tests/_data/fixtures/views/macro/conditionaldate.volt.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php $this->macros['conditionaldate'] = function($__p = null) { if (isset($__p[0])) { $condition = $__p[0]; } else { if (array_key_exists("condition", $__p)) { $condition = $__p["condition"]; } else { throw new \Phalcon\Mvc\View\Exception("Macro 'conditionaldate' was called without parameter: condition"); } } if (isset($__p[1])) { $tdate = $__p[1]; } else { if (array_key_exists("tdate", $__p)) { $tdate = $__p["tdate"]; } else { throw new \Phalcon\Mvc\View\Exception("Macro 'conditionaldate' was called without parameter: tdate"); } } if (isset($__p[2])) { $ttime = $__p[2]; } else { if (array_key_exists("ttime", $__p)) { $ttime = $__p["ttime"]; } else { throw new \Phalcon\Mvc\View\Exception("Macro 'conditionaldate' was called without parameter: ttime"); } } if (isset($__p[3])) { $tz = $__p[3]; } else { if (array_key_exists("tz", $__p)) { $tz = $__p["tz"]; } else { throw new \Phalcon\Mvc\View\Exception("Macro 'conditionaldate' was called without parameter: tz"); } } ?><?php if ($condition) { ?>from <br/><?= $tdate ?>, <?= $ttime ?> <?= $tz ?><?php } ?><?php }; $this->macros['conditionaldate'] = \Closure::bind($this->macros['conditionaldate'], $this); ?><?php $tdate = date('Y-m-d'); ?><?php $ttime = date('H:i'); ?><?php $tz = 'UTC'; ?><?= $this->callMacro('conditionaldate', [true, $tdate, $ttime, $tz]) ?>
4 changes: 4 additions & 0 deletions tests/_data/fixtures/views/macro/form_row.volt.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php $this->macros['formRow'] = function($__p = null) { if (isset($__p[0])) { $form = $__p[0]; } else { if (array_key_exists("form", $__p)) { $form = $__p["form"]; } else { throw new \Phalcon\Mvc\View\Exception("Macro 'formRow' was called without parameter: form"); } } if (isset($__p[1])) { $tag = $__p[1]; } else { if (array_key_exists("tag", $__p)) { $tag = $__p["tag"]; } else { throw new \Phalcon\Mvc\View\Exception("Macro 'formRow' was called without parameter: tag"); } } if (isset($__p[2])) { $attributes = $__p[2]; } else { if (array_key_exists("attributes", $__p)) { $attributes = $__p["attributes"]; } else { $attributes = ''; } } if (isset($__p[3])) { $col = $__p[3]; } else { if (array_key_exists("col", $__p)) { $col = $__p["col"]; } else { $col = 6; } } ?><?php $defaultClass = 'form-control '; ?><?php if ((is_array($attributes) || ($attributes) instanceof Traversable)) { ?><?php foreach ($attributes as $key => $value) { ?><?php $attr[$key] = $value; ?><?php } ?><?php } else { ?><?php $attr['class'] = $defaultClass . $attributes; ?><?php } ?><div class="form-group">
<label class="col-sm-2 control-label" for="<?= $tag ?>"><?= $form->getLabel($tag) ?>:</label>
<div class="col-sm-<?= $col ?>"><?= $form->render($tag, $attr) ?></div>
</div><?php }; $this->macros['formRow'] = \Closure::bind($this->macros['formRow'], $this); ?><?= $this->callMacro('formRow', [$formLogin, 'password']) ?>
1 change: 1 addition & 0 deletions tests/_data/fixtures/views/macro/hello.volt.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php $this->macros['hello'] = function($__p = null) { if (isset($__p[0])) { $name = $__p[0]; } else { if (array_key_exists("name", $__p)) { $name = $__p["name"]; } else { throw new \Phalcon\Mvc\View\Exception("Macro 'hello' was called without parameter: name"); } } ?><?php return 'Hello ' . $name; ?><?php }; $this->macros['hello'] = \Closure::bind($this->macros['hello'], $this); ?><?= $this->callMacro('hello', ['World']) ?>
1 change: 1 addition & 0 deletions tests/_data/fixtures/views/macro/list.volt.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php $this->macros['list'] = function($__p = null) { if (isset($__p[0])) { $var = $__p[0]; } else { if (array_key_exists("var", $__p)) { $var = $__p["var"]; } else { throw new \Phalcon\Mvc\View\Exception("Macro 'list' was called without parameter: var"); } } ?><?= var_dump($var) ?><?php }; $this->macros['list'] = \Closure::bind($this->macros['list'], $this); ?><?= $this->callMacro('list', [$object]) ?>
1 change: 1 addition & 0 deletions tests/_data/fixtures/views/macro/my_input.volt.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php $this->macros['my_input'] = function($__p = null) { if (isset($__p[0])) { $name = $__p[0]; } else { if (array_key_exists("name", $__p)) { $name = $__p["name"]; } else { throw new \Phalcon\Mvc\View\Exception("Macro 'my_input' was called without parameter: name"); } } if (isset($__p[1])) { $class = $__p[1]; } else { if (array_key_exists("class", $__p)) { $class = $__p["class"]; } else { $class = 'input-text'; } } ?><?php return $this->tag->textField([$name, 'class' => $class]); ?><?php }; $this->macros['my_input'] = \Closure::bind($this->macros['my_input'], $this); ?><?= '<p>' . $this->callMacro('my_input', ['name']) . '</p>' ?>
1 change: 1 addition & 0 deletions tests/_data/fixtures/views/partials/footer.volt.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>This is the footer</p>
1 change: 1 addition & 0 deletions tests/_data/fixtures/views/partials/header.volt.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1>This is the header</h1>
1 change: 1 addition & 0 deletions tests/_data/fixtures/views/partials/header2.volt.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1>This is the title</h1>
1 change: 1 addition & 0 deletions tests/_data/fixtures/views/partials/header3.volt.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is the title
4 changes: 2 additions & 2 deletions tests/cli/Di/FactoryDefault/Cli/ConstructCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
use Phalcon\Cli\Dispatcher;
use Phalcon\Cli\Router;
use Phalcon\Di\FactoryDefault\Cli;
use Phalcon\Escaper;
use Phalcon\Escaper\Escaper;
use Phalcon\Filter\Filter;
use Phalcon\Mvc\Model\MetaData\Memory;
use Phalcon\Mvc\Model\Transaction\Manager;
use Phalcon\Security;
use Phalcon\Security\Security;

class ConstructCest
{
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/Mvc/Micro/GetServiceCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

use IntegrationTester;
use Phalcon\Di;
use Phalcon\Escaper;
use Phalcon\Escaper\Escaper;
use Phalcon\Mvc\Dispatcher;
use Phalcon\Mvc\Micro;
use Phalcon\Mvc\Router;
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/Mvc/Micro/HasServiceCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

use IntegrationTester;
use Phalcon\Di;
use Phalcon\Escaper;
use Phalcon\Escaper\Escaper;
use Phalcon\Mvc\Dispatcher;
use Phalcon\Mvc\Micro;
use Phalcon\Mvc\Router;
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/Mvc/Micro/OffsetExistsCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

use IntegrationTester;
use Phalcon\Di;
use Phalcon\Escaper;
use Phalcon\Escaper\Escaper;
use Phalcon\Mvc\Dispatcher;
use Phalcon\Mvc\Micro;
use Phalcon\Mvc\Router;
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/Mvc/Micro/OffsetGetCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

use IntegrationTester;
use Phalcon\Di;
use Phalcon\Escaper;
use Phalcon\Escaper\Escaper;
use Phalcon\Mvc\Dispatcher;
use Phalcon\Mvc\Micro;
use Phalcon\Mvc\Router;
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/Mvc/Micro/OffsetUnsetCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

use IntegrationTester;
use Phalcon\Di;
use Phalcon\Escaper;
use Phalcon\Escaper\Escaper;
use Phalcon\Mvc\Micro;

class OffsetUnsetCest
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/Mvc/View/Engine/Volt/CompilerCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
use DateTime;
use IntegrationTester;
use Phalcon\Di;
use Phalcon\Escaper;
use Phalcon\Escaper\Escaper;
use Phalcon\Forms\Element\Password;
use Phalcon\Forms\Form;
use Phalcon\Mvc\View;
Expand Down

0 comments on commit 070d355

Please sign in to comment.