Welcome Guest, Not a member yet? Register   Sign In
How to change data which is init by autoloader?
#1

[eluser]liren[/eluser]
Hello friends:

I initialize a tree object using autoloader.I want to using this tree structure in many models in my app.My problem is that how to change this tree object? My users want to change data and structure of this tree. How to get this tree object and change it?Thanks!
#2

[eluser]toopay[/eluser]
configure some 'pre_controller' hook to handle that.
#3

[eluser]liren[/eluser]
[quote author="toopay" date="1302251795"]configure some 'pre_controller' hook to handle that.[/quote]

Thank you toopay:

But what I want to do is change global value which is initialize by autoloader.otherthan change the value before I call a controller.
For example,I autoload a $var="hello" to memory,how to change the value of $var while system running?
I initial a tree class on app started. This tree is a menu structure.Web administrator could edit the menu structure in app console. So I want to know how to do it. Thanks!
#4

[eluser]toopay[/eluser]
What type resource which you load by autoloader? config, package, helper or library?
#5

[eluser]liren[/eluser]
[quote author="toopay" date="1302259581"]What type resource which you load by autoloader? config, package, helper or library?[/quote]

Hi toopay:

I want to autoload an array data when webapp start. the array data like this:

Code:
$arr = array(
    'menu1' => 'home page',
    'menu2' => 'cms page',
    $arr = array(
        'menu2_1' => 'cms_admin',
        'menu2_2' => 'cms_console',
        'menu2_3' => 'cms_view',
        'menu2_4' => 'cms_layoutadmin'
    ),
    'menu3' => 'forum'
);
How to put this data to memory when webapp start? Thanks!@
#6

[eluser]toopay[/eluser]
i give some example on [url:ellislab.com/forums/viewthread/185924/]your other thread[url]
#7

[eluser]toopay[/eluser]
[url:ellislab.com/forums/viewthread/185924/]your other thread[/url]
#8

[eluser]toopay[/eluser]
[url http://ellislab.com/forums/viewthread/185924/]your other thread[url]
#9

[eluser]toopay[/eluser]
:coolmad: sorry for that unreadable link. Here




Theme © iAndrew 2016 - Forum software by © MyBB