parser
This commit is contained in:
96
composer.lock
generated
96
composer.lock
generated
@@ -192,17 +192,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/class-loader",
|
"name": "symfony/class-loader",
|
||||||
"version": "v2.1.7",
|
"version": "v2.1.8",
|
||||||
"target-dir": "Symfony/Component/ClassLoader",
|
"target-dir": "Symfony/Component/ClassLoader",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/ClassLoader",
|
"url": "https://github.com/symfony/ClassLoader.git",
|
||||||
"reference": "v2.1.7"
|
"reference": "v2.1.8"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://github.com/symfony/ClassLoader/archive/v2.1.7.zip",
|
"url": "https://api.github.com/repos/symfony/ClassLoader/zipball/v2.1.8",
|
||||||
"reference": "v2.1.7",
|
"reference": "v2.1.8",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -211,7 +211,7 @@
|
|||||||
"require-dev": {
|
"require-dev": {
|
||||||
"symfony/finder": "2.1.*"
|
"symfony/finder": "2.1.*"
|
||||||
},
|
},
|
||||||
"time": "2013-01-09 08:51:07",
|
"time": "2013-01-26 07:21:53",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": {
|
"psr-0": {
|
||||||
@@ -237,17 +237,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/config",
|
"name": "symfony/config",
|
||||||
"version": "v2.1.7",
|
"version": "v2.1.8",
|
||||||
"target-dir": "Symfony/Component/Config",
|
"target-dir": "Symfony/Component/Config",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/Config",
|
"url": "https://github.com/symfony/Config.git",
|
||||||
"reference": "v2.1.7"
|
"reference": "v2.1.8"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://github.com/symfony/Config/archive/v2.1.7.zip",
|
"url": "https://api.github.com/repos/symfony/Config/zipball/v2.1.8",
|
||||||
"reference": "v2.1.7",
|
"reference": "v2.1.8",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -279,17 +279,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/console",
|
"name": "symfony/console",
|
||||||
"version": "v2.1.7",
|
"version": "v2.1.8",
|
||||||
"target-dir": "Symfony/Component/Console",
|
"target-dir": "Symfony/Component/Console",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/Console",
|
"url": "https://github.com/symfony/Console.git",
|
||||||
"reference": "v2.1.7"
|
"reference": "v2.1.8"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://github.com/symfony/Console/archive/v2.1.7.zip",
|
"url": "https://api.github.com/repos/symfony/Console/zipball/v2.1.8",
|
||||||
"reference": "v2.1.7",
|
"reference": "v2.1.8",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -321,17 +321,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/dependency-injection",
|
"name": "symfony/dependency-injection",
|
||||||
"version": "v2.1.7",
|
"version": "v2.1.8",
|
||||||
"target-dir": "Symfony/Component/DependencyInjection",
|
"target-dir": "Symfony/Component/DependencyInjection",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/DependencyInjection",
|
"url": "https://github.com/symfony/DependencyInjection.git",
|
||||||
"reference": "v2.1.7"
|
"reference": "v2.1.8"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://github.com/symfony/DependencyInjection/archive/v2.1.7.zip",
|
"url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/v2.1.8",
|
||||||
"reference": "v2.1.7",
|
"reference": "v2.1.8",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -345,7 +345,7 @@
|
|||||||
"symfony/config": "2.1.*",
|
"symfony/config": "2.1.*",
|
||||||
"symfony/yaml": "2.1.*"
|
"symfony/yaml": "2.1.*"
|
||||||
},
|
},
|
||||||
"time": "2013-01-17 21:21:51",
|
"time": "2013-02-11 11:42:49",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": {
|
"psr-0": {
|
||||||
@@ -371,17 +371,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/event-dispatcher",
|
"name": "symfony/event-dispatcher",
|
||||||
"version": "v2.1.7",
|
"version": "v2.1.8",
|
||||||
"target-dir": "Symfony/Component/EventDispatcher",
|
"target-dir": "Symfony/Component/EventDispatcher",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/EventDispatcher",
|
"url": "https://github.com/symfony/EventDispatcher.git",
|
||||||
"reference": "v2.1.7"
|
"reference": "v2.1.8"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://github.com/symfony/EventDispatcher/archive/v2.1.7.zip",
|
"url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/v2.1.8",
|
||||||
"reference": "v2.1.7",
|
"reference": "v2.1.8",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -394,7 +394,7 @@
|
|||||||
"symfony/dependency-injection": "2.1.*",
|
"symfony/dependency-injection": "2.1.*",
|
||||||
"symfony/http-kernel": "2.1.*"
|
"symfony/http-kernel": "2.1.*"
|
||||||
},
|
},
|
||||||
"time": "2013-01-11 00:31:43",
|
"time": "2013-02-11 11:26:14",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": {
|
"psr-0": {
|
||||||
@@ -420,23 +420,23 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/http-foundation",
|
"name": "symfony/http-foundation",
|
||||||
"version": "v2.1.7",
|
"version": "v2.1.8",
|
||||||
"target-dir": "Symfony/Component/HttpFoundation",
|
"target-dir": "Symfony/Component/HttpFoundation",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/HttpFoundation",
|
"url": "https://github.com/symfony/HttpFoundation.git",
|
||||||
"reference": "v2.1.7"
|
"reference": "v2.1.8"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://github.com/symfony/HttpFoundation/archive/v2.1.7.zip",
|
"url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/v2.1.8",
|
||||||
"reference": "v2.1.7",
|
"reference": "v2.1.8",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.3"
|
"php": ">=5.3.3"
|
||||||
},
|
},
|
||||||
"time": "2013-01-11 00:31:43",
|
"time": "2013-02-22 18:02:22",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": {
|
"psr-0": {
|
||||||
@@ -463,17 +463,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/http-kernel",
|
"name": "symfony/http-kernel",
|
||||||
"version": "v2.1.7",
|
"version": "v2.1.8",
|
||||||
"target-dir": "Symfony/Component/HttpKernel",
|
"target-dir": "Symfony/Component/HttpKernel",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/HttpKernel",
|
"url": "https://github.com/symfony/HttpKernel.git",
|
||||||
"reference": "v2.1.7"
|
"reference": "v2.1.8"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://github.com/symfony/HttpKernel/archive/v2.1.7.zip",
|
"url": "https://api.github.com/repos/symfony/HttpKernel/zipball/v2.1.8",
|
||||||
"reference": "v2.1.7",
|
"reference": "v2.1.8",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -499,7 +499,7 @@
|
|||||||
"symfony/dependency-injection": "2.1.*",
|
"symfony/dependency-injection": "2.1.*",
|
||||||
"symfony/finder": "2.1.*"
|
"symfony/finder": "2.1.*"
|
||||||
},
|
},
|
||||||
"time": "2013-01-17 16:21:47",
|
"time": "2013-02-23 21:28:36",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": {
|
"psr-0": {
|
||||||
@@ -525,34 +525,34 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/routing",
|
"name": "symfony/routing",
|
||||||
"version": "v2.1.7",
|
"version": "v2.1.8",
|
||||||
"target-dir": "Symfony/Component/Routing",
|
"target-dir": "Symfony/Component/Routing",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/Routing",
|
"url": "https://github.com/symfony/Routing.git",
|
||||||
"reference": "v2.1.7"
|
"reference": "v2.1.8"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://github.com/symfony/Routing/archive/v2.1.7.zip",
|
"url": "https://api.github.com/repos/symfony/Routing/zipball/v2.1.8",
|
||||||
"reference": "v2.1.7",
|
"reference": "v2.1.8",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.3"
|
"php": ">=5.3.3"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"doctrine/common": ">=2.2,<2.4-dev",
|
"doctrine/common": ">=2.2,<3.0",
|
||||||
"symfony/config": "2.1.*",
|
"symfony/config": "2.1.*",
|
||||||
"symfony/http-kernel": "2.1.*",
|
"symfony/http-kernel": "2.1.*",
|
||||||
"symfony/yaml": "2.1.*"
|
"symfony/yaml": "2.1.*"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"doctrine/common": ">=2.2,<2.4-dev",
|
"doctrine/common": "~2.2",
|
||||||
"symfony/config": "2.1.*",
|
"symfony/config": "2.1.*",
|
||||||
"symfony/yaml": "2.1.*"
|
"symfony/yaml": "2.1.*"
|
||||||
},
|
},
|
||||||
"time": "2013-01-09 08:51:07",
|
"time": "2013-02-22 18:53:49",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": {
|
"psr-0": {
|
||||||
|
|||||||
@@ -69,11 +69,9 @@ class TheliaBundle extends Bundle
|
|||||||
|
|
||||||
$container->register('resolver', 'Symfony\Component\HttpKernel\Controller\ControllerResolver');
|
$container->register('resolver', 'Symfony\Component\HttpKernel\Controller\ControllerResolver');
|
||||||
|
|
||||||
$container->register('tpex', 'Thelia\Tpex\Tpex');
|
|
||||||
|
|
||||||
$container->register('parser','Thelia\Core\Template\Parser')
|
$container->register('parser','Thelia\Core\Template\Parser')
|
||||||
->addArgument(new Reference('service_container'))
|
->addArgument(new Reference('service_container'))
|
||||||
->addArgument(new Reference('tpex'))
|
|
||||||
;
|
;
|
||||||
/**
|
/**
|
||||||
* RouterListener implements EventSubscriberInterface and listen for kernel.request event
|
* RouterListener implements EventSubscriberInterface and listen for kernel.request event
|
||||||
|
|||||||
@@ -75,10 +75,9 @@ class Parser implements ParserInterface
|
|||||||
*
|
*
|
||||||
* public function __construct(ContainerBuilder $container)
|
* public function __construct(ContainerBuilder $container)
|
||||||
*/
|
*/
|
||||||
public function __construct(ContainerInterface $container, Tpex $tpex)
|
public function __construct(ContainerInterface $container)
|
||||||
{
|
{
|
||||||
$this->container = $container;
|
$this->container = $container;
|
||||||
$this->tpex = $tpex;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -148,16 +147,18 @@ class Parser implements ParserInterface
|
|||||||
public function loadParser()
|
public function loadParser()
|
||||||
{
|
{
|
||||||
$content = $this->openFile($this->getRequest());
|
$content = $this->openFile($this->getRequest());
|
||||||
|
|
||||||
$this->tpex->init($this->container->get("request"), $this->container->get("dispatcher"), $content, THELIA_TEMPLATE_DIR . rtrim($this->template, "/") . "/");
|
$tpex = new Tpex();
|
||||||
$this->tpex->configure(
|
|
||||||
|
$tpex->init($this->container->get("request"), $this->container->get("dispatcher"), $content, THELIA_TEMPLATE_DIR . rtrim($this->template, "/") . "/");
|
||||||
|
$tpex->configure(
|
||||||
array(),
|
array(),
|
||||||
array(),
|
array(),
|
||||||
array(
|
array(
|
||||||
"secure" => "Thelia\Core\Template\BaseParam\Secure"
|
"secure" => "Thelia\Core\Template\BaseParam\Secure"
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$this->setContent($this->tpex->execute());
|
$this->setContent($tpex->execute());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function openFile(Request $request)
|
protected function openFile(Request $request)
|
||||||
|
|||||||
Submodule core/lib/Thelia/Tpex updated: 3830a56197...b591fc524d
@@ -5,8 +5,34 @@
|
|||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div>TODO write content
|
<div>TODO write content #SET{toto, 4} toto vaut #GET{toto} zeafazefaze azef azef azef azef
|
||||||
#INCLUDE "include1.html"
|
<THELIA_FOO type="foo" id="loop1" param1="#GET{toto}">
|
||||||
|
#TOTO
|
||||||
|
<THELIA_FU type="doobitch" param1="value1" param2="#TUTU">
|
||||||
|
#ALFRED azd azd azed azd
|
||||||
|
<T:CHAPO>#CHAPO</T:CHAPO>le chapo est vide<//T:CHAPO>
|
||||||
|
</THELIA_FU>
|
||||||
|
</THELIA_FOO>
|
||||||
|
<T_BAR>
|
||||||
|
avant boucle
|
||||||
|
<THELIA_BAR type="bar" id="loop2" param1="value1">
|
||||||
|
#FU
|
||||||
|
<TEST_ex3 variable="#UNEVARIABLE" test="egal" valeur="0">
|
||||||
|
UNEVARIABLE vaut zéro
|
||||||
|
</TEST_ex3>
|
||||||
|
UNEVARIABLE ne vaut pas zéro
|
||||||
|
<//TEST_ex3>
|
||||||
|
</THELIA_BAR>
|
||||||
|
après boucle
|
||||||
|
</T_BAR>
|
||||||
|
après boucle vide
|
||||||
|
<//T_BAR>
|
||||||
|
|
||||||
|
<REPEAT_loopy start="1" end="5" increment="2">
|
||||||
|
Compteur = #INDEX<br />
|
||||||
|
</REPEAT_loopy>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user