@@ -32,6 +32,8 @@ global **system/Helpers** directory.
3232Loading a Helper
3333================
3434
35+ .. note :: The URL helper is always loaded so you do not need to load it yourself.
36+
3537Loading a helper file is quite simple using the following method:
3638
3739.. literalinclude :: helpers/001.php
@@ -44,22 +46,31 @@ For example, to load the **Cookie Helper** file, which is named
4446
4547.. literalinclude :: helpers/002.php
4648
49+ .. note :: The Helper loading method above does not return a value, so
50+ don't try to assign it to a variable. Just use it as shown.
51+
52+ Loading Multiple Helpers
53+ ------------------------
54+
4755If you need to load more than one helper at a time, you can pass
4856an array of file names in and all of them will be loaded:
4957
5058.. literalinclude :: helpers/003.php
5159
60+ Loading in a Controller
61+ -----------------------
62+
5263A helper can be loaded anywhere within your controller methods (or
5364even within your View files, although that's not a good practice), as
54- long as you load it before you use it. You can load your helpers in your
65+ long as you load it before you use it.
66+
67+ You can load your helpers in your
5568controller constructor so that they become available automatically in
5669any function, or you can load a helper in a specific function that needs
5770it.
5871
59- .. note :: The Helper loading method above does not return a value, so
60- don't try to assign it to a variable. Just use it as shown.
61-
62- .. note :: The URL helper is always loaded so you do not need to load it yourself.
72+ However if you want to load in your controller constructor, you can use the ``$helpers ``
73+ property in Controller instead. See :ref: `Controllers <controllers-helpers >`.
6374
6475Loading from Non-standard Locations
6576-----------------------------------
0 commit comments