public function takePicture($filename)
    {
        if (empty($filename)) {
            throw new \InvalidArgumentException('Filename required');
        }

        # TODO check filepath and create missing dirs?

        $this->valueArguments['output'] = $filename;

        $this->execute(
            $this->buildCommand()
        );
    }
public function takePicture($filename)
    {
        if (empty($filename)) {
            throw new \InvalidArgumentException('Filename required');
        }

        # TODO check filepath and create missing dirs?

        $this->valueArguments['output'] = $filename;

        $this->execute(
            $this->buildCommand()
        );
    }
public function takePicture ( $ filename ) { if ( empty ( $ filename ) ) { throw new \ InvalidArgumentException ( 'Filename required' ) ; } # TODO check filepath and create missing dirs? $ this -> valueArguments [ 'output' ] = $ filename ; $ this -> execute ( $ this -> buildCommand ( ) ) ; }
Take a picture and save with the given filename

**Example:**
```php
// Take picture with default configurations
$camera->takePicture('pic1.jpg');
```

@param string $filename
Take a picture and save with the given filename