[eluser]mattalexx[/eluser]
[quote author="gansodesoya" date="1284793493"]And we noticed that Library Function from the Loader Object does accept an object name parameter[/quote]
Really? Mine does. (1.7.2)
system/libraries/Loader.php
Code:
/**
* Class Loader
*
* This function lets users load and instantiate classes.
* It is designed to be called from a user's app controllers.
*
* @access public
* @param string the name of the class
* @param mixed the optional parameters
* @param string an optional object name
* @return void
*/
function library($library = '', $params = NULL, $object_name = NULL)
{
// ...
In my controller:
Code:
$this->load->library('shop');
$this->load->library('shop', NULL, 'shop2');
var_dump(spl_object_hash($this->shop)); // string(32) "7c29bccdea241a1d687bf2bcd079d72d"
var_dump(spl_object_hash($this->shop)); // string(32) "7c29bccdea241a1d687bf2bcd079d72d"
var_dump(spl_object_hash($this->shop2)); // string(32) "9f39067c36930b2ec4ceb174f518a23e"