diff --git a/docs/designers/language-builtin-functions/language-function-foreach.md b/docs/designers/language-builtin-functions/language-function-foreach.md index 645d6c52..a0b7b588 100644 --- a/docs/designers/language-builtin-functions/language-function-foreach.md +++ b/docs/designers/language-builtin-functions/language-function-foreach.md @@ -166,7 +166,7 @@ looping over a PHP iterator instead of an array(). ```php assign('firstname', 'Doug'); diff --git a/docs/getting-started.md b/docs/getting-started.md index 35b4e135..a827b4a3 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -26,6 +26,7 @@ Here's how you create an instance of Smarty in your PHP scripts: setTemplateDir('/some/template/dir'); $smarty->setConfigDir('/some/config/dir'); @@ -73,6 +74,8 @@ You can verify if your system has the correct access rights for these directories with [`testInstall()`](./programmers/api-functions/api-test-install.md): ```php +setTemplateDir('/some/template/dir'); $smarty->setConfigDir('/some/config/dir'); @@ -106,6 +109,7 @@ Now lets edit our php file. We'll create an instance of Smarty, require 'vendor/autoload.php'; +use Smarty\Smarty; $smarty = new Smarty(); $smarty->setTemplateDir('/web/www.example.com/guestbook/templates/'); diff --git a/docs/programmers/advanced-features/advanced-features-security.md b/docs/programmers/advanced-features/advanced-features-security.md index 160754ad..4379eaad 100644 --- a/docs/programmers/advanced-features/advanced-features-security.md +++ b/docs/programmers/advanced-features/advanced-features-security.md @@ -85,6 +85,8 @@ Smarty\_Security class or create an instance of it. allow_constants = false; @@ -104,7 +107,7 @@ Smarty\_Security class or create an instance of it. enableSecurity(); diff --git a/docs/programmers/api-functions/api-compile-all-config.md b/docs/programmers/api-functions/api-compile-all-config.md index a102fc97..35497d9a 100644 --- a/docs/programmers/api-functions/api-compile-all-config.md +++ b/docs/programmers/api-functions/api-compile-all-config.md @@ -50,7 +50,7 @@ parameters: setCaching(true); diff --git a/docs/programmers/api-functions/api-register-class.md b/docs/programmers/api-functions/api-register-class.md index ee339cad..d0156d51 100644 --- a/docs/programmers/api-functions/api-register-class.md +++ b/docs/programmers/api-functions/api-register-class.md @@ -24,6 +24,7 @@ otherwise. If security is enabled, classes registered with registerClass("Foo", "\my\php\application\Bar"); diff --git a/docs/programmers/api-functions/api-register-default-plugin-handler.md b/docs/programmers/api-functions/api-register-default-plugin-handler.md index b75a9f30..61ac4761 100644 --- a/docs/programmers/api-functions/api-register-default-plugin-handler.md +++ b/docs/programmers/api-functions/api-register-default-plugin-handler.md @@ -25,7 +25,7 @@ plugin types. registerDefaultPluginHandler('my_plugin_handler'); diff --git a/docs/programmers/api-functions/api-test-install.md b/docs/programmers/api-functions/api-test-install.md index 918bd220..bba64a19 100644 --- a/docs/programmers/api-functions/api-test-install.md +++ b/docs/programmers/api-functions/api-test-install.md @@ -14,7 +14,7 @@ installation can be accessed. It does output a corresponding protocol. testInstall(); ?> diff --git a/docs/programmers/api-variables/variable-default-config-handler-func.md b/docs/programmers/api-variables/variable-default-config-handler-func.md index 90891426..50eb65bb 100644 --- a/docs/programmers/api-variables/variable-default-config-handler-func.md +++ b/docs/programmers/api-variables/variable-default-config-handler-func.md @@ -12,7 +12,7 @@ resource. default_config_handler_func = 'my_default_config_handler_func'; diff --git a/docs/programmers/api-variables/variable-default-template-handler-func.md b/docs/programmers/api-variables/variable-default-template-handler-func.md index 8e9efa9d..96c8190d 100644 --- a/docs/programmers/api-variables/variable-default-template-handler-func.md +++ b/docs/programmers/api-variables/variable-default-template-handler-func.md @@ -12,7 +12,7 @@ resource. default_template_handler_func = 'my_default_template_handler_func'; diff --git a/docs/programmers/caching/caching-custom.md b/docs/programmers/caching/caching-custom.md index e9c33368..b53afcfd 100644 --- a/docs/programmers/caching/caching-custom.md +++ b/docs/programmers/caching/caching-custom.md @@ -38,7 +38,7 @@ to invoke your custom CacheResource implementation. caching_type = 'mysql'; @@ -198,7 +198,7 @@ to invoke your custom CacheResource implementation. caching_type = 'memcache'; diff --git a/docs/programmers/caching/caching-groups.md b/docs/programmers/caching/caching-groups.md index 7e248b2f..a3502f3f 100644 --- a/docs/programmers/caching/caching-groups.md +++ b/docs/programmers/caching/caching-groups.md @@ -38,7 +38,7 @@ structure that mimics your template file structure, such as setCaching(Smarty::CACHING_LIFETIME_CURRENT); diff --git a/docs/programmers/caching/caching-multiple-caches.md b/docs/programmers/caching/caching-multiple-caches.md index 40fffc3d..a25e442c 100644 --- a/docs/programmers/caching/caching-multiple-caches.md +++ b/docs/programmers/caching/caching-multiple-caches.md @@ -10,7 +10,7 @@ parameter to the function call. setCaching(Smarty::CACHING_LIFETIME_CURRENT); @@ -47,7 +47,7 @@ Be sure to pass the same `$cache_id` as the second parameter to setCaching(Smarty::CACHING_LIFETIME_CURRENT); @@ -70,7 +70,7 @@ the first parameter to [`clearCache()`](#api.clear.cache). setCaching(Smarty::CACHING_LIFETIME_CURRENT); diff --git a/docs/programmers/caching/caching-setting-up.md b/docs/programmers/caching/caching-setting-up.md index 3a79d6f8..189c7cd3 100644 --- a/docs/programmers/caching/caching-setting-up.md +++ b/docs/programmers/caching/caching-setting-up.md @@ -7,7 +7,7 @@ The first thing to do is enable caching by setting cacheLifetime() to determine @@ -41,7 +41,7 @@ setting [`$caching`](#variable.caching) to setCaching(Smarty::CACHING_LIFETIME_CURRENT); @@ -101,7 +101,7 @@ process. setCaching(Smarty::CACHING_LIFETIME_CURRENT); @@ -133,7 +133,7 @@ files [and groups](#caching.groups) with the setCaching(Smarty::CACHING_LIFETIME_CURRENT); diff --git a/docs/programmers/plugins/plugins-resources.md b/docs/programmers/plugins/plugins-resources.md index 400f4efa..86a18127 100644 --- a/docs/programmers/plugins/plugins-resources.md +++ b/docs/programmers/plugins/plugins-resources.md @@ -31,6 +31,8 @@ example. registerResource('mysql', new My_Resource_Mysql()); diff --git a/docs/programmers/resources/resources-custom.md b/docs/programmers/resources/resources-custom.md index 7d05e4f5..1c41de1c 100644 --- a/docs/programmers/resources/resources-custom.md +++ b/docs/programmers/resources/resources-custom.md @@ -17,6 +17,8 @@ on the functions you are supposed to provide. registerResource('mysql', new My_Resource_Mysql()); diff --git a/docs/programmers/resources/template-resources.md b/docs/programmers/resources/template-resources.md index a14e518f..15662493 100644 --- a/docs/programmers/resources/template-resources.md +++ b/docs/programmers/resources/template-resources.md @@ -26,6 +26,8 @@ on the functions you are supposed to provide. registerResource('mysql', new My_Resource_Mysql());