PHP Class Gush\Helper\MetaHelper

Inheritance: extends Symfony\Component\Console\Helper\Helper
Show file Open project: gushphp/gush Class Usage Examples

Protected Properties

Property Type Description
$supportedFiles array

Public Methods

Method Description
__construct ( $supportedExtensionClassCollection )
filterFilesList ( array $filesList, array $excludesList ) : array Filter the list of files to update.
getMetaClass ( string $type ) : Gush\Meta\Meta
getName ( )
getSupportedFiles ( ) : array
isUpdatable ( Gush\Meta\Meta $meta, string $fileContent ) : boolean
registerFileType ( string $fileType, Gush\Meta\Meta $class )
renderHeader ( string $header, string $type, string $prefix = '' ) : string
updateContent ( Gush\Meta\Meta $meta, string $header, string $fileContent ) : string Update the content with the header.

Method Details

__construct() public method

public __construct ( $supportedExtensionClassCollection )

filterFilesList() public method

Filter the list of files to update.
public filterFilesList ( array $filesList, array $excludesList ) : array
$filesList array
$excludesList array
return array

getMetaClass() public method

public getMetaClass ( string $type ) : Gush\Meta\Meta
$type string
return Gush\Meta\Meta

getName() public method

public getName ( )

getSupportedFiles() public method

public getSupportedFiles ( ) : array
return array

isUpdatable() public method

public isUpdatable ( Gush\Meta\Meta $meta, string $fileContent ) : boolean
$meta Gush\Meta\Meta
$fileContent string
return boolean

registerFileType() public method

public registerFileType ( string $fileType, Gush\Meta\Meta $class )
$fileType string
$class Gush\Meta\Meta

renderHeader() public method

public renderHeader ( string $header, string $type, string $prefix = '' ) : string
$header string
$type string
$prefix string
return string

updateContent() public method

Note. We only support comments in the beginning of the file. If there is already a comment its replaced, if its missing its added.
public updateContent ( Gush\Meta\Meta $meta, string $header, string $fileContent ) : string
$meta Gush\Meta\Meta
$header string
$fileContent string
return string

Property Details

$supportedFiles protected property

protected array $supportedFiles
return array