You are here

function composer_autoload_get_autoload_paths in Composer Autoload 7

Returns the cached list of autoload.php files.

Return value

array An array of strings pointing to found autoload.php files.

2 calls to composer_autoload_get_autoload_paths()
composer_autoload_help in ./composer_autoload.module
Implements hook_help().
composer_autoload_init in ./composer_autoload.module
Implements hook_init().

File

./composer_autoload.module, line 29
Provides primary Drupal hook implementations.

Code

function composer_autoload_get_autoload_paths() {

  // Statically cache the loaders list.
  $loaders =& drupal_static('composer_autoload');
  if (!isset($loaders)) {

    // Retrieve the loaders list from the cache.
    if ($cache = cache_get('composer_autoload')) {
      $loaders = $cache->data;
    }
    else {

      // The cache is not available, so rebuild it.
      $loaders = composer_autoload_cache_rebuild();
      cache_set('composer_autoload', $loaders);
    }
  }
  return $loaders;
}