пятница, 30 апреля 2010 г.

CodeIgniter 2.0: load_class

Изменился формат вызова load_class.
Был:

/**
* Class registry
*
* This function acts as a singleton. If the requested class does not
* exist it is instantiated and set to a static variable. If it has
* previously been instantiated the variable is returned.
*
* @access public
* @param string the class name being requested
* @param bool optional flag that lets classes get loaded but not instantiated
* @return object
*/
function &load_class($class, $instantiate = TRUE)

Стал:

/**
* Class registry
*
* This function acts as a singleton. If the requested class does not
* exist it is instantiated and set to a static variable. If it has
* previously been instantiated the variable is returned.
*
* @access public
* @param string the class name being requested
* @param string the directory where the class should be found
* @param string the class name prefix
* @return object
*/
function &load_class($class, $directory = 'libraries', $prefix = 'CI_')


Benchmark, Config, Controller, Exceptions, Hooks, Input, Lang, Loader, Model, Output, Router, Unicode, URI - теперь в 'core'.

P.S. Сегодня долго с Exceptions бился...

Похожие по тематике посты:

Комментариев нет: