public function __construct($resources)
public function __construct($resources)
Parameters
CelerityPhysicalResources | $resources |
Return
this | //Implicit.// |
public function getNameMap()
public function getNameMap()
Return
wild |
public function getSymbolMap()
public function getSymbolMap()
Return
wild |
public function getRequiresMap()
public function getRequiresMap()
Return
wild |
public function getPackageMap()
public function getPackageMap()
Return
wild |
public function setDebug($debug)
public function setDebug($debug)
Parameters
$debug |
Return
wild |
protected function log($message)
protected function log($message)
Parameters
$message |
Return
wild |
public function generate()
public function generate()
Return
wild |
public function write()
public function write()
Return
wild |
private function formatMapContent($data)
private function formatMapContent($data)
Parameters
array | $data |
Return
wild |
private function rebuildBinaryResources($resources)
private function rebuildBinaryResources($resources)
Find binary resources (like PNG and SWF) and return information about them.
Parameters
CelerityPhysicalResources | $resources | Resource map to find binary resources for. |
Return
map<string, map<string, string>> | Resource information map. |
private function rebuildTextResources($resources, $xformer)
private function rebuildTextResources($resources, $xformer)
Find text resources (like JS and CSS) and return information about them.
Parameters
CelerityPhysicalResources | $resources | Resource map to find text resources for. |
CelerityResourceTransformer | $xformer | Configured resource transformer. |
Return
map<string, map<string, string>> | Resource information map. |
private function getProvidesAndRequires($name, $data)
private function getProvidesAndRequires($name, $data)
Parse the @provides and @requires symbols out of a text resource, like JS or CSS.
Parameters
string | $name | Resource name. |
string | $data | Resource data. |
Return
pair<string|null, list<string>|null> | The `@provides` symbol and the list of `@requires` symbols. If the resource is not part of the dependency graph, both are null. |
private function detectGraphCycles($nodes)
private function detectGraphCycles($nodes)
Check for dependency cycles in the resource graph. Raises an exception if a cycle is detected.
Parameters
map<string, | $nodes | list<string>> Map of `@provides` symbols to their `@requires` symbols. |
Return
void |
private function rebuildPackages($resources, $symbol_map, $reverse_map)
private function rebuildPackages($resources, $symbol_map, $reverse_map)
Build package specifications for a given resource source.
Parameters
CelerityPhysicalResources | $resources | Resource source to rebuild. |
map<string, | $symbol_map | string> Map of `@provides` to hashes. |
map<string, | $reverse_map | string> Map of hashes to resource names. |
Return
map<string, map<string, string>> | Package information maps. |
private function mergeNameMaps($maps)
private function mergeNameMaps($maps)
Parameters
array | $maps |
Return
wild |
private function parseResourceSymbolList($list)
private function parseResourceSymbolList($list)
Parameters
$list |
Return
wild |
private function newResourceHash($data)
private function newResourceHash($data)
Parameters
$data |
Return
wild |