Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
archery
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
3
Issues
3
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
archery
Commits
2b82d420
Commit
2b82d420
authored
Jun 08, 2015
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made Latte cache dir configurable
parent
9373a74b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
app.php
app.php
+4
-1
No files found.
app.php
View file @
2b82d420
...
@@ -40,9 +40,12 @@ define('ROOT_URL', $config['root_url']);
...
@@ -40,9 +40,12 @@ define('ROOT_URL', $config['root_url']);
* Set up app with custom Latte view
* Set up app with custom Latte view
*/
*/
if
(
!
file_exists
(
$config
[
'cache_dir'
]))
mkdir
(
$config
[
'cache_dir'
],
0777
,
true
);
$view
=
new
Slim\Latte\LatteView
(
array
(
$view
=
new
Slim\Latte\LatteView
(
array
(
'path'
=>
__DIR__
.
'/templates'
,
'path'
=>
__DIR__
.
'/templates'
,
'cache'
=>
__DIR__
.
'/.cache
/latte'
,
'cache'
=>
$config
[
'cache_dir'
]
.
'
/latte'
,
'configure_engine'
=>
function
(
$engine
)
{
'configure_engine'
=>
function
(
$engine
)
{
// support for {_'...'} syntax in latte templates
// support for {_'...'} syntax in latte templates
$engine
->
addFilter
(
'translate'
,
function
()
{
$engine
->
addFilter
(
'translate'
,
function
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment