PHP Класс Robo\Task\Assets\Minify

php taskMinify( 'web/assets/theme.css' ) ->run() ?> Please install additional dependencies to use: "patchwork/jsqueeze": "~1.0", "natxet/CssMin": "~3.0"
Наследование: extends Robo\Task\BaseTask
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$dst string
$squeezeOptions array
$text string
$type string
$types array

Открытые методы

Метод Описание
__construct ( string $input ) Constructor. Accepts asset file path or string source.
__toString ( ) : string
keepImportantComments ( boolean $keepImportantComments ) keepImportantComments option for the JS minimisation.
run ( )
singleLine ( boolean $singleLine ) Single line option for the JS minimisation.
specialVarRx ( boolean $specialVarRx ) specialVarRx option for the JS minimisation.
to ( string $dst ) Sets destination. Tries to guess type from it.
type ( string $type ) Sets type with validation.

Защищенные методы

Метод Описание
fromFile ( string $path ) Sets text from asset file path. Tries to guess type and set default destination.
fromText ( string $text ) Sets text from string source.
getExtension ( string $path ) : string Gets file extension from path.
getMinifiedText ( ) : string | boolean Minifies and returns text.

Описание методов

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

Constructor. Accepts asset file path or string source.
public __construct ( string $input )
$input string

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

public __toString ( ) : string
Результат string

fromFile() защищенный Метод

Sets text from asset file path. Tries to guess type and set default destination.
protected fromFile ( string $path )
$path string

fromText() защищенный Метод

Sets text from string source.
protected fromText ( string $text )
$text string

getExtension() защищенный Метод

Gets file extension from path.
protected getExtension ( string $path ) : string
$path string
Результат string

getMinifiedText() защищенный Метод

Minifies and returns text.
protected getMinifiedText ( ) : string | boolean
Результат string | boolean

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

keepImportantComments option for the JS minimisation.
public keepImportantComments ( boolean $keepImportantComments )
$keepImportantComments boolean

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

public run ( )

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

Single line option for the JS minimisation.
public singleLine ( boolean $singleLine )
$singleLine boolean

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

specialVarRx option for the JS minimisation.
public specialVarRx ( boolean $specialVarRx )
$specialVarRx boolean

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

Sets destination. Tries to guess type from it.
public to ( string $dst )
$dst string

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

Sets type with validation.
public type ( string $type )
$type string css|js

Описание свойств

$dst защищенное свойство

protected string $dst
Результат string

$squeezeOptions защищенное свойство

protected array $squeezeOptions
Результат array

$text защищенное свойство

protected string $text
Результат string

$type защищенное свойство

protected string $type
Результат string

$types защищенное свойство

protected array $types
Результат array