PHP 클래스 Imbo\Storage\Doctrine

Parameters for this driver: -
(string) dbname
Name of the database to connect to -
(string) user
Username to use when connecting -
(string) password
Password to use when connecting -
(string) host
Hostname to use when connecting -
(string) driver
Which driver to use
저자: Christer Edvartsen ([email protected])
상속: implements Imbo\Storage\StorageInterface
파일 보기 프로젝트 열기: imbo/imbo 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( array $params, Doctrine\DBAL\Connection $connection = null ) Class constructor
delete ( $user, $imageIdentifier )
getImage ( $user, $imageIdentifier )
getLastModified ( $user, $imageIdentifier )
getStatus ( )
imageExists ( $user, $imageIdentifier )
store ( $user, $imageIdentifier, $imageData )

보호된 메소드들

메소드 설명
getTableName ( string $user, string $imageIdentifier ) : string Method that can be overridden to dynamically select table names based on the user and the image identifier. The default implementation does not use them for anything, and simply returns the default table name.

비공개 메소드들

메소드 설명
getConnection ( ) : Doctrine\DBAL\Connection Get the Doctrine connection
getField ( string $user, string $imageIdentifier, string $field ) Fetch a field from the image table
setConnection ( Doctrine\DBAL\Connection $connection ) : Doctrine Set the connection instance

메소드 상세

__construct() 공개 메소드

Class constructor
public __construct ( array $params, Doctrine\DBAL\Connection $connection = null )
$params array Parameters for the driver
$connection Doctrine\DBAL\Connection Optional connection instance. Primarily used for testing

delete() 공개 메소드

public delete ( $user, $imageIdentifier )

getImage() 공개 메소드

public getImage ( $user, $imageIdentifier )

getLastModified() 공개 메소드

public getLastModified ( $user, $imageIdentifier )

getStatus() 공개 메소드

public getStatus ( )

getTableName() 보호된 메소드

Method that can be overridden to dynamically select table names based on the user and the image identifier. The default implementation does not use them for anything, and simply returns the default table name.
protected getTableName ( string $user, string $imageIdentifier ) : string
$user string The user which the image belongs to
$imageIdentifier string The image identifier to fetch
리턴 string Returns a table name where the image is located

imageExists() 공개 메소드

public imageExists ( $user, $imageIdentifier )

store() 공개 메소드

public store ( $user, $imageIdentifier, $imageData )