Skip to content

Instantly share code, notes, and snippets.

@xboston
Last active December 20, 2015 04:09
Show Gist options
  • Save xboston/6068788 to your computer and use it in GitHub Desktop.
Save xboston/6068788 to your computer and use it in GitHub Desktop.
<?php
// -- test1 ---------
// throw Phalcon\Tag\Exception: A dependency injector container is required to obtain the "escaper" service
Phalcon\Tag::setDefault("name", "test");
echo Phalcon\Tag::getValue("name");
// -- test2 ---------
// all ok!
$di = new \Phalcon\DI\FactoryDefault();
\Phalcon\Tag::getEscaperService();
\Phalcon\Tag::setDefault("name", "test");
echo \Phalcon\Tag::getValue("name");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment