Blog |

drapeko

@author drapeko

Archive for the ‘autoload’ tag

PHP Intelligencer, tiny autoload framework

with one comment

Several months ago I wrote an article that included several interesting examples of __autoload function, some autoloading approaches and a tiny script that is able find interfaces/classes and generate arrays of associations among these classes/interfaces, their locations and extended/included classes/interfaces.

http://wp.drapeko.com/2009/03/28/autoloading-in-php/

I widely use this script and I’ve found it really convenient.  I don’t have to think anymore of how to store my classes, what is the structure of the project etc. All this work is done by this script.

But… I have to launch it manually.

I’ve decided to go further and began to create a tiny framework called Intelligencer. This framework will extend functionality of the autoload generator script.

Some Intelligencers features:

  1. It is very tiny and does not depend on other frameworks and external libraries. It’s very easy to integrate it.
  2. It has an ability to store and control inheritance associations and relations between classes/interfaces and their locations.
  3. If something has changed Intelligencer will automatically regenerate (if necessary) lists of associations. It’s really very useful in the development stage.
  4. Intelligencer has a huge number of config settings. It’s flexible.
  5. Intelligencer supports environments. You can easily create your custom environments and switch between them.
  6. You can create several Intelligencers that will be responsible for different parts of your application.
  7. You can work with Intelligencer both on config level and API level.

If you use it, it will do all work for you. It’s an open source. Location -  sourceforge.

The first release will come very soon.

  • Share/Save/Bookmark

Written by rdrapeko

May 20th, 2009 at 10:37 pm

Autoloading in PHP

with 18 comments

computer_mainHave you ever been faced with autoloading in PHP? Are you a newbie? Do you think you understand the nature of autoloading? This article is for you. This article will take approximately 25-35 min.
This article:

  1. Asks you: what is an autoloading? Do you really understand how __autoload() function works?
  2. Examines several autoloading approches
  3. Suggests a script that scans folders for classes and interfaces and generates array of associations between classes and their locations.

Autoloading/Dependency generator: download (4.6 KB) 07 05 2009 →, description

Examples for this article: download (4.0 KB) →, description ↓

Read the rest of this entry »

  • Share/Save/Bookmark

Written by rdrapeko

March 28th, 2009 at 6:29 am

Promotions (coming soon)