Welcome Guest, Not a member yet? Register   Sign In
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, 02:06 PM
load class and not instantiate - by El Forum - 05-14-2011, 03:20 AM
load class and not instantiate - by El Forum - 05-14-2011, 04:03 AM
load class and not instantiate - by El Forum - 05-14-2011, 04:09 AM
load class and not instantiate - by El Forum - 05-14-2011, 05:10 AM
load class and not instantiate - by El Forum - 01-19-2012, 08:49 PM



Theme © iAndrew 2016 - Forum software by © MyBB