Skip to content

Commit

Permalink
Merge branch 'master' into v1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
fengqi committed Apr 25, 2017
2 parents b3d6e0a + 672c1cb commit 3d0ea69
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion examples/config/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
'compile_dir' => base_path('app/View/Compile'),
'config_dir' => base_path('app/View/Config'),
'cache_dir' => base_path('app/View/Cache'),
'caching' => 1
'plugin_dir' => base_path('app/View/Plugin'),
'caching' => 1,
'left_delimiter' => '{%',
'right_delimiter' => '%}',
]
];
7 changes: 5 additions & 2 deletions src/ViewSmarty.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,13 @@ public function __construct($config)
$smarty->setConfigDir($this->config['config_dir']);
$smarty->setCacheDir($this->config['cache_dir']);
$smarty->setCaching($this->config['caching']);
$smarty->addPluginsDir($this->config['plugin_dir']);
$smarty->left_delimiter = $this->config['left_delimiter'];
$smarty->right_delimiter = $this->config['right_delimiter'];

$this->view = $smarty;

return $this->view;
return $this;
}

/**
Expand Down Expand Up @@ -107,7 +110,7 @@ public function assign($key, $value)

$this->viewVars = array_merge($this->viewVars, [$key => $value]);

return true;
return $this;
}

/**
Expand Down
Empty file added tests/.gitkeep
Empty file.

0 comments on commit 3d0ea69

Please sign in to comment.