• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
load class and not instantiate

#3
[eluser]uniq[/eluser]
FYI

CI 1.7.x system/codeigniter/common.php
Code:
* @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)
{
...

CI 2.x system/core/common.php
Code:
* @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_')
{
...

and the problem is that I have lib with private __construct:
Code:
private function __construct()
{
  //disabled for Singleton pattern
}

of course I can use requered_once but then I have to work with include paths ...


Messages In This Thread
load class and not instantiate - by El Forum - 05-13-2011, 03:06 PM
load class and not instantiate - by El Forum - 05-14-2011, 04:20 AM
load class and not instantiate - by El Forum - 05-14-2011, 05:03 AM
load class and not instantiate - by El Forum - 05-14-2011, 05:09 AM
load class and not instantiate - by El Forum - 05-14-2011, 06:10 AM
load class and not instantiate - by El Forum - 01-19-2012, 09:49 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.