5095 Posts in 1518 Topics by 1114 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 294 Views |
-
Overriding/Extending Requirements and Requirements_Backend class

4 January 2012 at 5:38pm Last edited: 4 January 2012 5:38pm
Hello,
Is it possible to override or extend the Requirements and Requirements_Backend classes?
I want to add CDN URL support for loading CSS/JS resources so that I can get the combined CSS/JS files to be pulled from an external CDN URL.
I got this working by modifying the Requirements/Requirements_Backend classes but am looking for a more cleaner solution that does not involve hacking the core files.
Any hints/help on this?
Thanks,
Jatinder Singh Thind -
Re: Overriding/Extending Requirements and Requirements_Backend class

4 January 2012 at 7:26pm
You can subclass Requirements_Backend then, in your _config.php or Page_Controller::init(), call Requirements::set_backend(new MyBackend);
-
Re: Overriding/Extending Requirements and Requirements_Backend class

4 January 2012 at 11:23pm
That worked perfectly. Thanks a lot Simon.
| 294 Views | ||
|
Page:
1
|
Go to Top |

