Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
Update views with new version number and updated docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
silentworks committed Apr 3, 2014
1 parent fcfcdda commit f0a05ea
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 12 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@ Inside your Smarty template you would write:

{urlFor name="hello" options="name.Josh|age.26"}

You can easily pass variables that are arrays using the (.) or object using the (->) by doing:
or with the new array syntax:

{urlFor name="hello" options=["name" => "Josh", "age" => "26"]}

You can easily pass variables that are arrays as normal or using the (.):

<a href="{urlFor name="hello" options="name.{$person.name}|age.{$person.age}"}">Hello {$name}</a>

Expand Down
6 changes: 3 additions & 3 deletions Smarty.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Andrew Smith
* @link http://www.slimframework.com
* @copyright 2013 Josh Lockhart
* @version 0.1.0
* @version 0.1.2
* @package SlimViews
*
* MIT LICENSE
Expand Down Expand Up @@ -78,9 +78,9 @@ class Smarty extends \Slim\View
*
* This method will output the rendered template content
*
* @param string $template The path to the template, relative to the templates directory.
* @param string $template The path to the template, relative to the templates directory.
* @param null $data
* @return void
* @return string
*/
public function render($template, $data = null)
{
Expand Down
2 changes: 2 additions & 0 deletions SmartyPlugins/function.baseUrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
* Type: function
* Name: baseUrl
* Purpose: outputs url for a function with the defined name method
* version 0.1.2
* package SlimViews
* -------------------------------------------------------------
*/
function smarty_function_baseUrl($params, $template)
Expand Down
2 changes: 1 addition & 1 deletion SmartyPlugins/function.siteUrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Type: function
* Name: siteUrl
* Purpose: outputs url for a function with the defined name method
* version 0.1.0
* version 0.1.2
* package SlimViews
* -------------------------------------------------------------
*/
Expand Down
6 changes: 3 additions & 3 deletions SmartyPlugins/function.urlFor.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php
/*
/**
* Smarty plugin
* -------------------------------------------------------------
* File: function.urlFor.php
* Type: function
* Name: urlFor
* Purpose: outputs url for a function with the defined name method
* version 0.1.0
* package SlimViews
* @version 0.1.2
* @package SlimViews
* -------------------------------------------------------------
*/
function smarty_function_urlFor($params, $template)
Expand Down
6 changes: 3 additions & 3 deletions Twig.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Andrew Smith
* @link http://www.slimframework.com
* @copyright 2013 Josh Lockhart
* @version 0.1.0
* @version 0.1.2
* @package SlimViews
*
* MIT LICENSE
Expand Down Expand Up @@ -77,9 +77,9 @@ class Twig extends \Slim\View
*
* This method will output the rendered template content
*
* @param string $template The path to the Twig template, relative to the Twig templates directory.
* @param string $template The path to the Twig template, relative to the Twig templates directory.
* @param null $data
* @return void
* @return string
*/
public function render($template, $data = null)
{
Expand Down
2 changes: 1 addition & 1 deletion TwigExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Andrew Smith
* @link http://www.slimframework.com
* @copyright 2013 Josh Lockhart
* @version 0.1.0
* @version 0.1.2
* @package SlimViews
*
* MIT LICENSE
Expand Down

0 comments on commit f0a05ea

Please sign in to comment.