PHP 클래스 PhpThumb, thinksns

This is the GD Implementation of the PHP Thumb library.
파일 보기 프로젝트 열기: medz/thinksns-4 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_implementations array This stores what implementations are available based on the loaded extensions in PHP, NOT whether or not the class files are present.
$_instance Instance of self
$_registry array This is where all plugins to be loaded are stored. Data about the plugin is provided, and currently consists of: - loaded: true/false - implementation: gd/imagick/both

공개 메소드들

메소드 설명
getInstance ( ) : PhpThumb Returns an instance of self
getPluginRegistry ( string $implementation ) : array Returns the plugin registry for the supplied implementation
isValidImplementation ( string $implementation ) : boolean Returns whether or not $implementation is valid (available)
loadPlugins ( string $pluginPath ) Loads all the plugins in $pluginPath
registerPlugin ( string $pluginName, string $implementation ) : boolean Registers a plugin in the registry

비공개 메소드들

메소드 설명
__construct ( ) Class constructor
getImplementations ( ) Finds out what implementations are available

메소드 상세

getInstance() 공개 정적인 메소드

This is the usual singleton function that returns / instantiates the object
public static getInstance ( ) : PhpThumb
리턴 PhpThumb

getPluginRegistry() 공개 메소드

Returns the plugin registry for the supplied implementation
public getPluginRegistry ( string $implementation ) : array
$implementation string
리턴 array

isValidImplementation() 공개 메소드

If 'all' is passed, true is only returned if ALL implementations are available. You can also pass 'n/a', which always returns true
public isValidImplementation ( string $implementation ) : boolean
$implementation string
리턴 boolean

loadPlugins() 공개 메소드

All this function does is include all files inside the $pluginPath directory. The plugins themselves will not be added to the registry unless you've properly added the code to do so inside your plugin file.
public loadPlugins ( string $pluginPath )
$pluginPath string

registerPlugin() 공개 메소드

Adds a plugin to the registry if it isn't already loaded, and if the provided implementation is valid. Note that you can pass the following special keywords for implementation: - all - Requires that all implementations be available - n/a - Doesn't require any implementation When a plugin is added to the registry, it's added as a key on $this->_registry with the value being an array containing the following keys: - loaded - whether or not the plugin has been "loaded" into the core class - implementation - what implementation this plugin is valid for
public registerPlugin ( string $pluginName, string $implementation ) : boolean
$pluginName string
$implementation string
리턴 boolean

프로퍼티 상세

$_implementations 보호되어 있는 프로퍼티

This stores what implementations are available based on the loaded extensions in PHP, NOT whether or not the class files are present.
protected array $_implementations
리턴 array

$_instance 보호되어 있는 정적으로 프로퍼티

Instance of self
protected static $_instance

$_registry 보호되어 있는 프로퍼티

This is where all plugins to be loaded are stored. Data about the plugin is provided, and currently consists of: - loaded: true/false - implementation: gd/imagick/both
protected array $_registry
리턴 array