|
@@ 573-579 (lines=7) @@
|
| 570 |
|
// $this->_cache_on is toggled during the recursive loading that can occur with dependency injection |
| 571 |
|
// $cache is controlled by individual calls to separate Registry loader methods like load_class() |
| 572 |
|
// $load_only is also controlled by individual calls to separate Registry loader methods like load_file() |
| 573 |
|
if ( $this->_cache_on && $cache && ! $load_only ) { |
| 574 |
|
// return object if it's already cached |
| 575 |
|
$cached_class = $this->_get_cached_class( $class_name, $addon ); |
| 576 |
|
if ( $cached_class !== null ) { |
| 577 |
|
return $cached_class; |
| 578 |
|
} |
| 579 |
|
} |
| 580 |
|
// instantiate the requested object |
| 581 |
|
$class_obj = $this->_create_object( $class_name, $arguments, $addon, $from_db ); |
| 582 |
|
if ( $this->_cache_on && $cache ) { |
|
@@ 636-642 (lines=7) @@
|
| 633 |
|
// $this->_cache_on is toggled during the recursive loading that can occur with dependency injection |
| 634 |
|
// $cache is controlled by individual calls to separate Registry loader methods like load_class() |
| 635 |
|
// $load_only is also controlled by individual calls to separate Registry loader methods like load_file() |
| 636 |
|
if ( $this->_cache_on && $cache && ! $load_only ) { |
| 637 |
|
// return object if it's already cached |
| 638 |
|
$cached_class = $this->_get_cached_class( $class_name, $class_prefix ); |
| 639 |
|
if ( $cached_class !== null ) { |
| 640 |
|
return $cached_class; |
| 641 |
|
} |
| 642 |
|
} |
| 643 |
|
// if the class doesn't already exist.. then we need to try and find the file and load it |
| 644 |
|
if ( ! $class_exists ) { |
| 645 |
|
// get full path to file |