Loads a PHP file.
@api
mixed $file A PHP file path:
string $type The resource type:
public function load($file, $type = null) {
// the loader variable is exposed to the included file below
$loader = $this;
$path = $this->locator
->locate($file);
$this
->setCurrentDir(dirname($path));
$collection = (include $path);
$collection
->addResource(new FileResource($path));
return $collection;
}