You are here

public function Extension::__call in Service Container 7

Same name and namespace in other branches
  1. 7.2 lib/Drupal/Core/Extension/Extension.php \Drupal\Core\Extension\Extension::__call()

Re-routes method calls to SplFileInfo.

Offers all SplFileInfo methods to consumers; e.g., $extension->getMTime().

File

lib/Drupal/Core/Extension/Extension.php, line 156
Contains \Drupal\Core\Extension\Extension.

Class

Extension
Defines an extension (file) object.

Namespace

Drupal\Core\Extension

Code

public function __call($method, array $args) {
  if (!isset($this->splFileInfo)) {
    $this->splFileInfo = new \SplFileInfo($this->pathname);
  }
  return call_user_func_array(array(
    $this->splFileInfo,
    $method,
  ), $args);
}