/** * @param mixed $resources * @param array $options */ public function __construct($resources = array(), $options = array()) { // test if developer sends only one resource, and make it an array if (!is_array($resources)) { $resources = array($resources); } // append all resources foreach ($resources as $resource) { $this->append($resource); } // override options $this->options = Stdlib\Utils\ArrayUtils::mergeRecursiveRight($this->options, $options); $this->setCacheAdapter($this->options['cacheAdapter']); $this->setCLIPreprocessor($this->options['cliPreprocessor']); $this->setPHPPreprocessor($this->options['phpPreprocessor']); }
/** * @see \Athem\Code\Preproc::__construct() * * @param array $resources * @param array $options */ public function __construct($resources = array(), $options = array()) { $this->options = Stdlib\Utils\ArrayUtils::mergeRecursiveRight($this->options, array('lesscPath' => realpath(preg_replace('/library\\/Athem.+/', '', __DIR__)) . DIRECTORY_SEPARATOR . 'node_modules' . DIRECTORY_SEPARATOR . 'less' . DIRECTORY_SEPARATOR . 'bin' . DIRECTORY_SEPARATOR . 'lessc', 'lesscOptions' => '')); parent::__construct($resources, $options); }
/** * @param array $resources * @param array $options */ public function __construct($resources = array(), $options = array()) { $this->options = Stdlib\Utils\ArrayUtils::mergeRecursiveRight($this->options, array('phpOnly' => true, 'dwooCompiledDir' => '/tmp')); return parent::__construct($resources, $options); }
/** * @param array $resources * @param array $options */ public function __construct($resources = array(), $options = array()) { $this->options = Stdlib\Utils\ArrayUtils::mergeRecursiveRight($this->options, array('tmpExt' => 'sass', 'sassPath' => DIRECTORY_SEPARATOR . 'usr' . DIRECTORY_SEPARATOR . 'local' . DIRECTORY_SEPARATOR . 'bin' . DIRECTORY_SEPARATOR . 'sass', 'sassOptions' => '', 'sassParserOptions' => array('style' => 'expanded', 'cache' => FALSE, 'syntax' => \SassFile::SASS, 'debug' => FALSE))); return parent::__construct($resources, $options); }
/** * @param array $resources * @param array $options */ public function __construct($resources = array(), $options = array()) { $this->options = Stdlib\Utils\ArrayUtils::mergeRecursiveRight($this->options, array('yuiPath' => __DIR__ . '/yuicompressor-2.4.8.jar', 'yuiOptions' => '--type ' . (empty($options['type']) ? 'css' : $options['type']), 'java' => '/usr/bin/java')); parent::__construct($resources, $options); }
/** * @param array $resources * @param array $options */ public function __construct($resources = array(), $options = array()) { $this->options = Stdlib\Utils\ArrayUtils::mergeRecursiveRight($this->options, array('tmpExt' => 'sass', 'coffeePath' => realpath(preg_replace('/library\\/Athem.+/', '', __DIR__)) . DIRECTORY_SEPARATOR . 'node_modules' . DIRECTORY_SEPARATOR . 'coffee-script' . DIRECTORY_SEPARATOR . 'bin' . DIRECTORY_SEPARATOR . 'coffee', 'coffeeOptions' => '-bp', 'coffeeCompilerOptions' => array())); return parent::__construct($resources, $options); }
/** * Format a number with grouped thousands. * Unlike NumericUtils::format(), this function will override 'dec_point' * and 'thousands_sep' with values from localeconv(). * * @param $number * @param int $decimals * @param bool $options * @param null $p * @return float|string */ public static function localeFormat($number, $decimals = 2, $options = false, $p = null) { $locale = localeconv(); $options = ArrayUtils::mergeRecursiveRight(is_array($options) ? $options : array(), array('dec_point' => $locale['decimal_point'], 'thousands_sep' => $locale['thousands_sep'])); return self::format($number, $decimals, $options, $p); }
/** * @param array $resources * @param array $options */ public function __construct($resources = array(), $options = array()) { $this->options = Stdlib\Utils\ArrayUtils::mergeRecursiveRight($this->options, array('tmpExt' => 'scss', 'scssPath' => DIRECTORY_SEPARATOR . 'usr' . DIRECTORY_SEPARATOR . 'local' . DIRECTORY_SEPARATOR . 'bin' . DIRECTORY_SEPARATOR . 'scss', 'scssOptions' => '')); return parent::__construct($resources, $options); }
/** * @param array $options * @return array */ public static function getFactoryOptions($options = array()) { $options = \Athem\Stdlib\Utils\ArrayUtils::mergeRecursiveRight(self::$preprocOptions, empty($options) ? array() : $options); return $options; }
/** * @param array $resources * @param array $options */ public function __construct($resources = array(), $options = array()) { $this->options = Stdlib\Utils\ArrayUtils::mergeRecursiveRight($this->options, array('phpOnly' => true, 'twigOptions' => array())); return parent::__construct($resources, $options); }