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