Пример #1
0
	/**
	 * Includes needed libraries (CSSMin & JSMin).
	 */
	protected function __construct(array $config)
	{
		parent::__construct($config);

		require_once Kohana::find_file('vendor/cssmin', 'cssmin');
		require_once Kohana::find_file('vendor/jsmin', 'jsmin');
	}
Пример #2
0
	/**
	 * Sets location of YUI Compressor.
	 */
	protected function __construct($config)
	{
		parent::__construct($config);

		if ( ! $bin = Kohana::find_file('vendor', 'yuicompressor-'.self::YUI_VERSION, 'jar'))
		{
			throw new Kohana_Exception('YUI Compressor :version not found',
				array(':version' => self::YUI_VERSION));
		}
		elseif (is_executable($bin))
		{
			throw new Kohana_Exeption("YUI Compressor at ':location' must be executable",
				array(':location' => $bin));
		}

		self::$bin = $bin;
	}