Class Dynamic

Description

Dynamic Class

Handles generating links to static content that are a timestamp injected as to avoid hard caching. Also minifies content where applicable.

Note: you will want to add a mod_rewrite line to your .htaccess to support the routing to the filenames with the timestamp injected:

RewriteRule ^(.+)\.([\d]+)\.(css|js|gif|png|jpg|jpeg)$ /$1.$3 [NC,QSA]

Located in /classes/Dynamic.php (line 29)

Object
   |
   --Dynamic
Method Summary
string css ( $original_reference, string $reference)
string js ( $original_reference, [ $level = 'simple'], string $reference)
string reference (string $reference, [string $failover = false])
Methods
css (line 108)

Generate Stylesheet Reference

Attempts to minify the stylesheet and then returns the reference URI for the file, minified or not.

  • return: URI reference reference with dynamic content
  • access: public
string css ( $original_reference, string $reference)
  • string $reference: URI reference of the Stylesheet
  • $original_reference
js (line 175)

Generate Javascript Reference

Attempts to minify the source with Google's Closure compiler, and then returns the reference URI for the file, minified or not.

string js ( $original_reference, [ $level = 'simple'], string $reference)
  • string $reference: URI reference of the Javascript file
  • $original_reference
  • $level
reference (line 41)

Generate Reference

Appends a dynamic piece of information to the passed reference in the form of a UNIX timestamp added to the query string.

  • return: URI reference reference with dynamic content
  • access: public
string reference (string $reference, [string $failover = false])
  • string $reference: URI reference of the file
  • string $failover: URI reference to use if the reference can't be found

Documentation generated on Wed, 03 Oct 2012 17:46:05 -0400 by phpDocumentor 1.4.4