|
@@ 688-694 (lines=7) @@
|
| 685 |
|
// $this->_cache_on is toggled during the recursive loading that can occur with dependency injection |
| 686 |
|
// $cache is controlled by individual calls to separate Registry loader methods like load_class() |
| 687 |
|
// $load_only is also controlled by individual calls to separate Registry loader methods like load_file() |
| 688 |
|
if ($this->_cache_on && $cache && ! $load_only) { |
| 689 |
|
// return object if it's already cached |
| 690 |
|
$cached_class = $this->_get_cached_class($class_name, $addon); |
| 691 |
|
if ($cached_class !== null) { |
| 692 |
|
return $cached_class; |
| 693 |
|
} |
| 694 |
|
} |
| 695 |
|
// instantiate the requested object |
| 696 |
|
$class_obj = $this->_create_object($class_name, $arguments, $addon, $from_db); |
| 697 |
|
// if caching is turned on OR this class is cached in a class property |
|
@@ 791-797 (lines=7) @@
|
| 788 |
|
// $this->_cache_on is toggled during the recursive loading that can occur with dependency injection |
| 789 |
|
// $cache is controlled by individual calls to separate Registry loader methods like load_class() |
| 790 |
|
// $load_only is also controlled by individual calls to separate Registry loader methods like load_file() |
| 791 |
|
if ($this->_cache_on && $cache && ! $load_only) { |
| 792 |
|
// return object if it's already cached |
| 793 |
|
$cached_class = $this->_get_cached_class($class_name, $class_prefix); |
| 794 |
|
if ($cached_class !== null) { |
| 795 |
|
return $cached_class; |
| 796 |
|
} |
| 797 |
|
} |
| 798 |
|
// if the class doesn't already exist.. then we need to try and find the file and load it |
| 799 |
|
if (! $class_exists) { |
| 800 |
|
// get full path to file |