|
@@ 762-768 (lines=7) @@
|
| 759 |
|
// $this->_cache_on is toggled during the recursive loading that can occur with dependency injection |
| 760 |
|
// $cache is controlled by individual calls to separate Registry loader methods like load_class() |
| 761 |
|
// $load_only is also controlled by individual calls to separate Registry loader methods like load_file() |
| 762 |
|
if ($this->_cache_on && $cache && ! $load_only) { |
| 763 |
|
// return object if it's already cached |
| 764 |
|
$cached_class = $this->_get_cached_class($class_name, $addon, $arguments); |
| 765 |
|
if ($cached_class !== null) { |
| 766 |
|
return $cached_class; |
| 767 |
|
} |
| 768 |
|
}// obtain the loader method from the dependency map |
| 769 |
|
$loader = $this->_dependency_map->class_loader($class_name);// instantiate the requested object |
| 770 |
|
if ($loader instanceof Closure) { |
| 771 |
|
$class_obj = $loader($arguments); |
|
@@ 881-887 (lines=7) @@
|
| 878 |
|
// $this->_cache_on is toggled during the recursive loading that can occur with dependency injection |
| 879 |
|
// $cache is controlled by individual calls to separate Registry loader methods like load_class() |
| 880 |
|
// $load_only is also controlled by individual calls to separate Registry loader methods like load_file() |
| 881 |
|
if ($this->_cache_on && $cache && ! $load_only) { |
| 882 |
|
// return object if it's already cached |
| 883 |
|
$cached_class = $this->_get_cached_class($class_name, $class_prefix, $arguments); |
| 884 |
|
if ($cached_class !== null) { |
| 885 |
|
return $cached_class; |
| 886 |
|
} |
| 887 |
|
} |
| 888 |
|
// if the class doesn't already exist.. then we need to try and find the file and load it |
| 889 |
|
if (! $class_exists) { |
| 890 |
|
// get full path to file |