Skip to content

Php5 magic Autoloader

World Wide Web Server edited this page Jul 4, 2012 · 21 revisions

[h2]Plugin Introduction[/h2]

A simple Php5 Front-End for CI Loader Class. Bye bye [b]$this[/b].

[b]Credits[/b] Based on Modularity Plugin by Jonathon Hill (http://codeigniter.com/forums/viewthread/99960/P15/)

[b]Advantages:[/b]

  • No more calling get_instance() when you need to access the framework inside a model, library, helper, or view
  • Support for multiple database connections
  • More concise syntax
  • Lazy-load support

[b]Requirements:[/b]

  • CodeIgniter 1.5+
  • PHP5+

[b]Version 1.2 Changelog: (downloads: 23)[/b]

  • Added Support Codeigniter <= 1.7.3
  • Added Plugins()
  • Added Configs()
  • Added Vars()
  • Added Helpers()
  • Lightweight coding style.
  • All logic work delegated to CI Core for compatibility propose
  • Added support for ALL original functions params ($this->load->xxx('name', 'args1', 'args2'))
  • Renamed "Libs" in "Libraries" (a little longer, but reading style come first!).

[b]Version 1.3 Changelog: (downloads: 7)[/b]

  • Added more controls for downsize overhead
  • Added Php5 Helpers Mode :)
  • Added Plugin suffix

[b]Version 1.4 Changelog:[/b]

  • Added Langs()
  • Added Modularity for Configs, Helpers, Langs (es. Configs('rss')->line('ip');)
  • Libraries re-renamed in "Libs" by popular acclaim (lol)
  • Added more and more and more controls for downsize overhead
  • Better Docs

[b]Version 1.5 Changelog:[/b]

  • Added Libs('uri')->something(); support for CI parent instance
  • Check Control for Core CI Libs Autoloaded (Uri, Input, Config etc...). Now more faster
  • Created CI Wiki page

[b]Dowonload:[/b] http://codeigniter.com/forums/viewthread/134605/

[b]Installation:[/b] This is a plugin so no core hacking is required. Simply download, extract it into your [b]application/plugins[/b] folder. (auto)Load it just like any other plugin.

[h2]How to use the Plugin[/h2]

[h3]Views[/h3]

[code]

old way

$this->load->view('news_view', $data); %

Clone this wiki locally