You are here

Main.php in X Autoload 7.3

Same filename and directory in other branches
  1. 7.4 lib/Main.php

File

lib/Main.php
View source
<?php

class xautoload_Main {

  /**
   * @var xautoload_Container_LazyServices
   */
  protected $services;

  /**
   * @param xautoload_Container_LazyServices $services
   */
  function __construct($services) {
    $this->services = $services;
  }

  /**
   * Invalidate all values stored in APC.
   */
  function flushCache() {
    $this->services->apcKeyManager
      ->renewApcPrefix();
  }

  /**
   * @param string $file
   *   File path to a *.module or *.install file.
   */
  function registerModule($file) {
    $info = pathinfo($file);
    $modules[] = (object) array(
      'name' => $info['filename'],
      'filename' => $info['dirname'] . '/' . $info['filename'] . '.module',
      'type' => 'module',
    );
    $this->services->registrationHelper
      ->registerExtensions($modules);
  }

}

Classes

Namesort descending Description
xautoload_Main