public
Description: CakePHP helper to link to assets from a dedicated asset server
Homepage: http://teknoid.wordpress.com
Clone URL: git://github.com/teknoid/cakephp-asset-host-helper.git
name age message
file README.md Thu Sep 24 18:43:33 -0700 2009 Proper markdown ... in markdown README [teknoid]
directory views/ Wed Sep 23 12:45:18 -0700 2009 Adding README file [teknoid]
README.md

CAKEPHP CDN/Clould Front helper

Inspired by: Amazon's Cloud Front

And RoR's asset host helper: RoR's api docs :{

(Please read the above link for a detailed explanation of what's going on here)

Instead of using Javascript or HTML helpers, you can use the provided Cf (Cloud Front) helper to create links to assets, you can now use:

  • $cf->image();
  • $cf->jsLink();
  • $cf->css();

All options are exactly the same as default CakePHP helpers.

We make an assumption that local file system mirrors the remote one (on S3/Cloud Front/etc.)

The only settings you need to be concerned about are:

  • $assetHost = 'assets%d.example.com';
  • $numHostsMin = 0;
  • $numHostsMax = 3;
  • $sslHost = 'sslhost.example.com';

Be sure to replace the above values in the helper to match your setup

For any questions please contact me at the relevant blog post: Over here

Your input is greatly appreciated.