示例#1
0
文件: CLI.php 项目: mishal/iless
 /**
  * Constructor.
  *
  * @param array $cliArguments Array of ILess\CLI arguments ($argv array)
  * @param string $currentDir Current directory
  */
 public function __construct(array $cliArguments, $currentDir = null)
 {
     $this->scriptName = basename(array_shift($cliArguments));
     $this->cliArguments = $this->parseArguments($cliArguments);
     $this->currentDir = $currentDir ? $currentDir : getcwd();
     parent::__construct($this->convertOptions($this->cliArguments['options']));
 }
示例#2
0
 /**
  * Constructor.
  *
  * @param RulesetNode $root The root node
  * @param array $contentsMap Array of file contents map
  * @param array $options Array of options
  * @param Base64VLQ $encoder The encoder
  */
 public function __construct(RulesetNode $root, array $contentsMap, $options = [], Base64VLQ $encoder = null)
 {
     $this->root = $root;
     $this->contentsMap = $contentsMap;
     $this->encoder = $encoder ? $encoder : new Base64VLQ();
     parent::__construct($options);
 }
示例#3
0
 /**
  * Constructor
  *
  * @param array $importDirs Array of import paths to search
  * @param array $options Array of options
  */
 public function __construct($importDirs = [], $options = [])
 {
     $this->importDirs = (array) $importDirs;
     parent::__construct($options);
 }
示例#4
0
 /**
  * Constructor
  *
  * @param array $importPaths Array of import paths to search
  */
 public function __construct(PDO $dbh, $options = [])
 {
     $this->dbh = $dbh;
     parent::__construct($options);
 }