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

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

Return whether or not the passed in resource is supported by this loader
public supports ( string $resource, string | null $type = null ) : boolean
$resource string Plain string or filepath
$type string | null Not used
Результат boolean Whether or not the passed in resource is supported by this loader
    public function supports($resource, $type = null)
    {
        return is_array($resource);
    }

Usage Example

Пример #1
0
 /**
  * Test supports with a valid array
  */
 public function testSupports()
 {
     $array = Fixtures::getSamplePhpArray();
     $this->assertTrue($this->arrayLoader->supports($array));
 }