Egg::Manager - Model manager and view manager's base classes.
When starting, it initializes it.
Initial is set up.
The component specified by the configuration is concretely read, and it registers in @ISA of the manager handler.
It defaults to the component of LABEL_STRING and it sets it.
The label of the component of the default decided that LABEL_STRING is omitted by an initial setup is returned.
The object is initialized. PROJECT_OBJYECT is indispensable.
The object of the component corresponding to LABEL_STRING is returned.
When LABEL_STRING is omitted, default is used.
The constructor of the component is made to move again when the context method is called next annulling the object of the component corresponding to LABEL_STRING maintained with this object.
The component is registered and to call it by the context method, it sets it up. However, @ISA is not operated.
Require is done at the same time as registering the module of PACKAGE_STRING when an effective value to LOAD_BOOL is passed.
LABEL_STRING gives the name to call it by the context method.
PACKAGE_STRING gives the package name of the registered component. The value of LABEL_STRING is misappropriated when omitting it.
CONFIG can be omitted. It is preserved in the registration data when giving it. Moreover, if "PACKAGE_STRING::handler" exists and the class has succeeded to Egg::Base, CONFIG is defined in the config method of the class.
The main of this method is add_register method of Egg::Component.
The CALL_HOOK method of the component managed by 'labels' method of the CLASS_NAME class is continuously called.
The project name is added to the head of CLASS_NAME. Therefore, the name since the project name is passed.
CALL_HOOK is a name of the method of wanting the call of the hook.
# If it is MyApp::Model::Hooo. $e->model_manager->any_hook(qw/ Model::Hooo _finish /);
Nothing is done if there is no 'labels' method in the CLASS_NAME class.
The data obtained by the 'labels' method should be HASH reference. Moreover, the label name and the content of the called component should be the structures of object of the component in the key to the HASH.
Masatoshi Mizuno <firstname.lastname@example.org>
Copyright (C) 2008 Bee Flag, Corp. <http://egg.bomcity.com/>.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.