Cascade\Config\Loader\FileLoader\PhpArray::supports PHP Метод

supports() публичный Метод

Return whether or not the resource passed in is supported by this loader !\ This does not verify that the php file returns a valid array. An exception will be thrown when it is loaded if that is not the case.
public supports ( string $resource, string $type = null ) : boolean
$resource string Filepath
$type string Not used
Результат boolean Whether or not the passed in resource is supported by this loader
    public function supports($resource, $type = null)
    {
        return $this->isFile($resource) && $this->validateExtension($resource);
    }

Usage Example

Пример #1
0
 public function testDoesNotSupportNonPhpFiles()
 {
     $this->assertFalse($this->loader->supports('foo'));
     $this->assertFalse($this->loader->supports(__DIR__ . '/../../../Fixtures/fixture_config.json'));
 }