PHP Класс ImageFly

Автор: Fady Khalife
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$cache_dir Stores the path to the cache directory which is either whats set in the config "cache_dir" or processed sub directories when the "mimic_source_dir" config option id set to TRUE
$cached_file The cached filename with path ($this->cache_dir)
$config This modules config options
$image Kohana image instance
$serve_default A flag for weither we should serve the default or cached image
$source_dir Stores the path to the source directory (set in the config "source_dir")
$source_file The source filepath and filename
$source_modified Last modified Unix timestamp of the source file
$url_params Stores the URL params in the following format

Открытые методы

Метод Описание
__construct ( ) Constructorbot

Приватные методы

Метод Описание
_cached_exists ( ) : boolean Checks if a physical version of the cached image exists
_cached_required ( ) : boolean Checks that the param dimensions are are lower then current image dimensions
_create_cache_dir ( ) Try to create the config cache dir if required Set $cache_dir
_create_cached ( ) Creates a cached cropped/resized version of the file
_create_headers ( $file_data ) Create the image HTTP headers
_create_mimic_cache_dir ( ) Try to create the mimic cache dir from the source path if required Set $cache_dir
_encoded_filename ( ) : string Returns a hash of the filepath and params plus last modified of source to be used as a unique filename
_modified_headers ( $last_modified ) Rerurns 304 Not Modified HTTP headers if required and exits
_output_file ( $file_data ) Outputs the cached image file and exits
_serve_file ( ) Decide which filesource we are using and serve
_set_params ( ) Sets the operations params from the url

Описание методов

__construct() публичный Метод

Constructorbot
public __construct ( )

Описание свойств

$cache_dir защищенное свойство

Stores the path to the cache directory which is either whats set in the config "cache_dir" or processed sub directories when the "mimic_source_dir" config option id set to TRUE
protected $cache_dir

$cached_file защищенное свойство

The cached filename with path ($this->cache_dir)
protected $cached_file

$config защищенное свойство

This modules config options
protected $config

$image защищенное свойство

Kohana image instance
protected $image

$serve_default защищенное свойство

A flag for weither we should serve the default or cached image
protected $serve_default

$source_dir защищенное свойство

Stores the path to the source directory (set in the config "source_dir")
protected $source_dir

$source_file защищенное свойство

The source filepath and filename
protected $source_file

$source_modified защищенное свойство

Last modified Unix timestamp of the source file
protected $source_modified

$url_params защищенное свойство

Stores the URL params in the following format
protected $url_params