|
@@ 703-709 (lines=7) @@
|
| 700 |
|
: '';// $this->_cache_on is toggled during the recursive loading that can occur with dependency injection |
| 701 |
|
// $cache is controlled by individual calls to separate Registry loader methods like load_class() |
| 702 |
|
// $load_only is also controlled by individual calls to separate Registry loader methods like load_file() |
| 703 |
|
if ($this->_cache_on && $cache && ! $load_only) { |
| 704 |
|
// return object if it's already cached |
| 705 |
|
$cached_class = $this->_get_cached_class($class_name, $addon, $arguments); |
| 706 |
|
if ($cached_class !== null) { |
| 707 |
|
return $cached_class; |
| 708 |
|
} |
| 709 |
|
}// obtain the loader method from the dependency map |
| 710 |
|
$loader = $this->_dependency_map->class_loader($class_name);// instantiate the requested object |
| 711 |
|
if ($loader instanceof Closure) { |
| 712 |
|
$class_obj = $loader($arguments); |
|
@@ 822-828 (lines=7) @@
|
| 819 |
|
// $this->_cache_on is toggled during the recursive loading that can occur with dependency injection |
| 820 |
|
// $cache is controlled by individual calls to separate Registry loader methods like load_class() |
| 821 |
|
// $load_only is also controlled by individual calls to separate Registry loader methods like load_file() |
| 822 |
|
if ($this->_cache_on && $cache && ! $load_only) { |
| 823 |
|
// return object if it's already cached |
| 824 |
|
$cached_class = $this->_get_cached_class($class_name, $class_prefix, $arguments); |
| 825 |
|
if ($cached_class !== null) { |
| 826 |
|
return $cached_class; |
| 827 |
|
} |
| 828 |
|
} |
| 829 |
|
// if the class doesn't already exist.. then we need to try and find the file and load it |
| 830 |
|
if (! $class_exists) { |
| 831 |
|
// get full path to file |