I want to research the source code of pyrocms, and when I read the Base.php
, I can't understand the following code
new CI;
the file is system/cms/libraries/Base.php
My problems are
$CI = new CI
;CI::$APP->config->item('controller_suffix')
in it's sub class MX_Controller
since there does not have variable name?Thank you very much!!!
CI_Controller
, which in turns loads a Loader
and initializer it, ....)So, we don't build it in order to manipulate it afterwards, but in order to run the code in its constructor.
CI::$APP-> whatever
because $APP
is a static member, hence it doesn't require to have an instance of CI
to be manipulatedDeclaring class properties or methods as static makes them accessible without needing an instantiation of the class. A property declared as static cannot be accessed with an instantiated class object (though a static method can).