Skip to content

Instantly share code, notes, and snippets.

@favrik
Created January 23, 2010 14:58
Show Gist options
  • Save favrik/284635 to your computer and use it in GitHub Desktop.
Save favrik/284635 to your computer and use it in GitHub Desktop.
How I organize groupsConfig.php in PHP Minify.
<?php
/**
* Groups configuration for default Minify implementation
* @package Minify
*/
/**
* You may wish to use the Minify URI Builder app to suggest
* changes. http://yourdomain/min/builder/
**/
class grc {
private $array;
private $base;
private $key;
function k($k) {
$this->key = $k;
return $this;
}
function b($b) {
$this->base = $b;
return $this;
}
function a($a) {
$this->array[$this->key][] = '//' . $this->base . $a;
return $this;
}
function o($o) {
$this->array[$this->key][] = '//' . $o;
return $this;
}
function g() {
return $this->array;
}
}
$g = new grc();
$a = $g
->k('js')
->b('js/jquery/')
->a('jquery-1.3.2.js')
->a('jquery-dom.js')
->a('jquery.json-1.3.min.js')
->o('js/swfobject/swfobject.js')
->b('projects/yuplay/yuplay/')
->a('player.js')
->a('playlist.js')
->a('search.js')
->a('search_results.js')
->a('utils.js')
->a('yuplay.js')
->k('css')
->o('projects/yuplay/yuplay.css')
->g();
return $a;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment