PHP Class Minify_Source_Factory, minify

Mostra file Open project: mrclay/minify

Protected Properties

Property Type Description
$env Minify_Env
$handlers callable[]
$options array

Public Methods

Method Description
__construct ( Minify_Env $env, array $options = [], Minify_CacheInterface $cache = null )
checkIsFile ( string $file ) : string
makeSource ( mixed $spec ) : Minify_SourceInterface
setHandler ( string $basenamePattern, callable $handler )

Method Details

__construct() public method

public __construct ( Minify_Env $env, array $options = [], Minify_CacheInterface $cache = null )
$env Minify_Env
$options array noMinPattern : Pattern matched against basename of the filepath (if present). If the pattern matches, Minify will try to avoid re-compressing the resource. fileChecker : Callable responsible for verifying the existence of the file. resolveDocRoot : If true, a leading "//" will be replaced with the document root. checkAllowDirs : If true, the filepath will be verified to be within one of the directories specified by allowDirs. allowDirs : Directory paths in which sources can be served. uploaderHoursBehind : How many hours behind are the file modification times of uploaded files? If you upload files from Windows to a non-Windows server, Windows may report incorrect mtimes for the files. Immediately after modifying and uploading a file, use the touch command to update the mtime on the server. If the mtime jumps ahead by a number of hours, set this variable to that number. If the mtime moves back, this should not be needed.
$cache Minify_CacheInterface Optional cache for handling .less files.

checkIsFile() public method

public checkIsFile ( string $file ) : string
$file string
return string

makeSource() public method

public makeSource ( mixed $spec ) : Minify_SourceInterface
$spec mixed
return Minify_SourceInterface

setHandler() public method

public setHandler ( string $basenamePattern, callable $handler )
$basenamePattern string A pattern tested against basename. E.g. "~\.css$~"
$handler callable Function that recieves a $spec array and returns a Minify_SourceInterface

Property Details

$env protected_oe property

protected Minify_Env $env
return Minify_Env

$handlers protected_oe property

protected callable[] $handlers
return callable[]

$options protected_oe property

protected array $options
return array