Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed Twig templates and added a global layout (which is probably clo…
…ser to what you would do in a real application)
- Loading branch information
Showing
7 changed files
with
45 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<title><?php $view->slots->output('title', 'Hello Application') ?></title> | ||
</head> | ||
<body> | ||
<?php $view->slots->output('_content') ?> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<title>{% block title %}Hello Application{% endblock %}</title> | ||
</head> | ||
<body> | ||
{% block body %}{% endblock %} | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{% extends "HelloBundle::layout" %} | ||
|
||
Hello {{ $name }}! | ||
{% block content %} | ||
Hello {{ name }}! | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
</head> | ||
<body> | ||
<?php $view->slots->output('_content') ?> | ||
</body> | ||
</html> | ||
<?php $view->extend('::layout') ?> | ||
|
||
<h1>Hello Application</h1> | ||
|
||
<?php $view->slots->output('_content') ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
</head> | ||
<body> | ||
{% block body %}{% endblock %} | ||
</body> | ||
</html> | ||
{% extends "::layout" %} | ||
|
||
{% block body %} | ||
<h1>Hello Application</h1> | ||
|
||
{% block content %}{% endblock %} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
<?php | ||
|
||
xhprof_enable(); | ||
|
||
require_once __DIR__.'/../hello/HelloKernel.php'; | ||
|
||
$kernel = new HelloKernel('prod', false); | ||
$kernel->handle()->send(); | ||
|
||
$xhprof_data = xhprof_disable(); | ||
include_once "/Users/fabien/work/symfony/2_0/blog/web/xhprof-0.9.2/xhprof_lib/utils/xhprof_lib.php"; | ||
include_once "/Users/fabien/work/symfony/2_0/blog/web/xhprof-0.9.2/xhprof_lib/utils/xhprof_runs.php"; | ||
$xhprof_runs = new XHProfRuns_Default(); | ||
$run_id = $xhprof_runs->save_run($xhprof_data, "PR2", 1); | ||
echo "http://<xhprof-ui-address>/index.php?run=$run_id&source=products\n"; |