PHP 클래스 PhpThumbFactory, thinksns

This class is responsible for making sure everything is set up and initialized properly, and returning the appropriate thumbnail class instance. It is the only recommended way of using this library, and if you try and circumvent it, the sky will fall on your head :) Basic use is easy enough. First, make sure all the settings meet your needs and environment... these are the static variables defined at the beginning of the class. Once that's all set, usage is pretty easy. You can simply do something like: $thumb = PhpThumbFactory::create('/path/to/file.png'); Refer to the documentation for the create function for more information
파일 보기 프로젝트 열기: medz/thinksns-4 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$defaultImplemenation string Currently, valid options are: - imagick - gd These are defined in the implementation map variable, inside the create function
$pluginPath string Note, it's important that this path is properly defined. It is very likely that you'll have to change this, as the assumption here is based on a relative path.

공개 메소드들

메소드 설명
create ( string $filename = null, $options = [], $isDataStream = false ) : GdThumb Factory Function

메소드 상세

create() 공개 정적인 메소드

This function returns the correct thumbnail object, augmented with any appropriate plugins. It does so by doing the following: - Getting an instance of PhpThumb - Loading plugins - Validating the default implemenation - Returning the desired default implementation if possible - Returning the GD implemenation if the default isn't available - Throwing an exception if no required libraries are present
public static create ( string $filename = null, $options = [], $isDataStream = false ) : GdThumb
$filename string The path and file to load [optional]
리턴 GdThumb

프로퍼티 상세

$defaultImplemenation 공개적으로 정적으로 프로퍼티

Currently, valid options are: - imagick - gd These are defined in the implementation map variable, inside the create function
public static string $defaultImplemenation
리턴 string

$pluginPath 공개적으로 정적으로 프로퍼티

Note, it's important that this path is properly defined. It is very likely that you'll have to change this, as the assumption here is based on a relative path.
public static string $pluginPath
리턴 string