Development

Changeset 12697

You must first sign up to be able to contribute.

Changeset 12697

Show
Ignore:
Timestamp:
11/06/08 19:11:46 (1 year ago)
Author:
fabien
Message:

[1.1] made sure that the core autoloaded is registered only once per request

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/lib/autoload/sfCoreAutoload.class.php

    r12676 r12697  
    2828{ 
    2929  static protected 
    30     $instance = null; 
     30    $registered = false, 
     31    $instance   = null; 
    3132 
    3233  protected 
     
    6061  static public function register() 
    6162  { 
     63    if (self::$registered) 
     64    { 
     65      return; 
     66    } 
     67 
    6268    ini_set('unserialize_callback_func', 'spl_autoload_call'); 
    6369    if (false === spl_autoload_register(array(self::getInstance(), 'autoload'))) 
     
    6571      throw new sfException(sprintf('Unable to register %s::autoload as an autoloading method.', get_class(self::getInstance()))); 
    6672    } 
     73 
     74    self::$registered = true; 
    6775  } 
    6876 

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting.
Sensio Labs also supports several large Open-Source projects.