PHP Class JMOlivas\Phpqa\Input\FilesOption

Show file Open project: jmolivas/phpqa Class Usage Examples

Public Methods

Method Description
__construct ( array $files )
isAbsent ( ) : boolean Returns true if this option is not provided
isEmpty ( ) : boolean Returns true if this option is provided but has no values
normalize ( ) : array Normalize the provided values as an array

Method Details

__construct() public method

public __construct ( array $files )
$files array

isAbsent() public method

Returns true if this option is not provided
public isAbsent ( ) : boolean
return boolean

isEmpty() public method

Returns true if this option is provided but has no values
public isEmpty ( ) : boolean
return boolean

normalize() public method

- If it's either empty or absent, it returns an empty array - If it's a single value separated by commas, it converts it to array - Otherwise returns the value as is.
public normalize ( ) : array
return array