Commando\Option::isFile PHP Méthode

isFile() public méthode

public isFile ( ) : boolean
Résultat boolean is this option a boolean
    public function isFile()
    {
        return $this->file;
    }

Usage Example

 public function testFileGlob()
 {
     $file = dirname(__FILE__) . '/assets/*.txt';
     $option = new Option(0);
     $option->setFileRequirements(true, true);
     $option->setValue($file);
     $file1 = dirname(__FILE__) . '/assets/example.txt';
     $file2 = dirname(__FILE__) . '/assets/another.txt';
     $values = $option->getValue();
     $this->assertTrue($option->isFile());
     $this->assertCount(2, $values);
     $this->assertTrue(in_array($file1, $values));
     $this->assertTrue(in_array($file2, $values));
 }