Neos\Flow\ResourceManagement\Streams\StreamWrapperAdapter::dir_opendir PHP Метод

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

This method is called in response to opendir().
public dir_opendir ( string $path, integer $options ) : boolean
$path string Specifies the URL that was passed to opendir().
$options integer Whether or not to enforce safe_mode (0x04).
Результат boolean TRUE on success or FALSE on failure.
    public function dir_opendir($path, $options)
    {
        $this->createStreamWrapper($path);
        return $this->streamWrapper->openDirectory($path, $options);
    }

Usage Example

 /**
  * @test
  */
 public function dir_opendirTest()
 {
     $path = 'mockScheme1://foo/bar';
     $options = 123;
     $this->streamWrapperAdapter->expects($this->once())->method('createStreamWrapper')->with($path);
     $this->mockStreamWrapper->expects($this->once())->method('openDirectory')->with($path, $options)->will($this->returnValue(true));
     $this->assertTrue($this->streamWrapperAdapter->dir_opendir($path, $options));
 }