@@ -40,7 +40,9 @@ static public function &factory($get_singleton = TRUE) {
40
40
}
41
41
42
42
protected $ configurations = array ();
43
- protected $ settings = array ();
43
+ protected $ settings = array (
44
+ 'alias ' => array (),
45
+ );
44
46
protected $ missing_engines = array ();
45
47
protected $ previous_engines = array ();
46
48
protected $ conversion_depth = 0 ;
@@ -167,6 +169,13 @@ public function convertString($source, &$destination, $convert_path = 'null->nul
167
169
return $ this ;
168
170
}
169
171
172
+ public function getCommandAlias ($ command ) {
173
+ if (isset ($ this ->settings ['alias ' ][$ command ])) {
174
+ return $ this ->settings ['alias ' ][$ command ];
175
+ }
176
+ return NULL ;
177
+ }
178
+
170
179
public function getConvertedString ($ source , $ convert_path = 'null->null ' ) {
171
180
$ destination = '' ;
172
181
$ this ->convertString ($ source , $ destination , $ convert_path );
@@ -274,7 +283,7 @@ public function getEngines($convert_path, $configuration_overrides = NULL, $conf
274
283
// This is similar to setConverter('a->b', 'force_id'),
275
284
// except that it might not be the first engine tried.
276
285
if (isset ($ configuration ['#final ' ])) {
277
- break (2 );
286
+ break (2 );
278
287
}
279
288
}
280
289
}
@@ -333,6 +342,10 @@ public function optimizeFile($source = NULL, $destination = NULL, $ext = NULL) {
333
342
return $ this ->convert ('file ' , "$ ext-> $ ext " , $ source , $ destination );
334
343
}
335
344
345
+ public function &setCommandAlias ($ alias , $ path ) {
346
+ $ this ->settings ['alias ' ][$ alias ] = $ path ;
347
+ }
348
+
336
349
public function &setConverter ($ convert_path = 'null->null ' , $ configuration = 'null:default ' ) {
337
350
$ conf = new ConfigurationOverride ($ this ->settings );
338
351
$ conf ->setConverter ($ convert_path , $ configuration );
0 commit comments