Exemplo n.º 1
0
 /**
  * Constructor
  *
  * NOTE: We never use the $settings variable passed to us,
  * because we want our Minimee_config object to always be in charge.
  *
  * @param 	mixed	Settings array - only passed when activating a hook
  * @return void
  */
 public function __construct($settings = array())
 {
     // Got EE?
     $this->EE =& get_instance();
     // grab a reference to our cache
     $this->cache =& Minimee_helper::cache();
     // grab instance of our config object
     $this->config = Minimee_helper::config();
 }
Exemplo n.º 2
0
 /**
  * Constructor
  *
  * @param Mixed 	Instance of Minimee_config, or Array to be passed to Minimee_config
  * @return void
  */
 public function __construct($config = array())
 {
     // got EE?
     $this->EE =& get_instance();
     // grab reference to our cache
     $this->cache =& Minimee_helper::cache();
     // set instance of our config object
     if ($config instanceof Minimee_config) {
         $this->config = $config;
     } else {
         $this->config = new Minimee_config($config);
     }
 }
Exemplo n.º 3
0
 /**
  * Constructor
  *
  * @return void
  */
 public function __construct($str = '')
 {
     // got EE?
     $this->EE =& get_instance();
     // grab reference to our cache
     $this->cache =& Minimee_helper::cache();
     // grab instance of our config object
     $this->config = Minimee_helper::config();
     // instantiate our Minimee_lib, pass our static config
     $this->MEE = new Minimee_lib($this->config);
     // magic: run as our "api"
     // Tagparts would have a length of 1 if calling minimee like {exp:minimee}...{/exp:minimee}
     // $str would contain custom field content if used as a field modifier (e.g. {ft_stylesheet:minimee})
     // Note that this is entirely untested and undocumented, and would require passing a type=""
     // parameter so that Minimee knows what sort of asset it's operating on. But in theory it's possible.
     if (count($this->EE->TMPL->tagparts) == 1 || $str) {
         $this->return_data = $this->api($str);
     }
     Minimee_helper::log('Minimee instantiated', 3);
 }