\ImageProfiles
Class ImageProfiles Allows image profiles to be defined in Config, then generate URLs for "lazy", on-demand image creation Inspired by Drupal's image handling approach
Synopsis
class ImageProfiles
extends DataExtension
{
- // members
- protected static array $caseLookup = ;
- // methods
- public static array getProfiles()
- protected static void ensureDirectoryExists()
- protected string tagMarkup()
- public string Profile()
- public string ProfileURL()
- public string Original()
- public string OriginalURL()
- public array allMethodNames()
- public string __call()
Hierarchy
Extends
- DataExtension
Members
protected
- $caseLookup — array
Methods
protected
- ensureDirectoryExists() — We have to do this prior to the actual HTTP request, otherwise we get 403 instead of 404 for non-existent dirs
- tagMarkup() — Returns an <img> tag for the given URL
public
- Original() — Returns an <img> tag for the original image
- OriginalURL() — Returns URL of original image
- Profile() — Returns an <img> tag for the requested profile
- ProfileURL() — Returns a URL for the requested profile
- __call() — A wildcard method for accepting any Profile name as a method.
- allMethodNames() — Defines all possible methods for this class. Used to support wildcard methods
- getProfiles() — Returns image profiles defined in Config, or empty array() if not found