PHP Class TippingCanoe\Imager\Service

Afficher le fichier Open project: tippingcanoe/imager

Protected Properties

Свойство Type Description
$app Illuminate\Foundation\Application
$currentDriver TippingCanoe\Imager\Storage\Driver
$imageRepository TippingCanoe\Imager\Repository\Image
$intervention Intervention\Image\ImageManager
$storageDrivers TippingCanoe\Imager\Storage\Driver[]

Méthodes publiques

Méthode Description
__construct ( TippingCanoe\Imager\Repository\Image $imageRepository, Intervention\Image\ImageManager $intervention, Illuminate\Foundation\Application $app, array $storageDrivers )
batch ( array $operations, array $files = null, TippingCanoe\Imager\Model\Imageable $imageable = null )
delete ( Image $image, array $filters = [] )
deleteById ( $id, array $filters = [] )
deleteBySlot ( $slot, TippingCanoe\Imager\Model\Imageable $imageable = null )
getById ( integer $id ) : Image Simply retrieves an image by id.
getBySlot ( $slot, TippingCanoe\Imager\Model\Imageable $imageable = null ) : Image
getPublicUri ( Image $image, array $filters = [] ) : string
getPublicUriById ( integer $id, array $filters = [] ) : string Returns an image URI based on the id of the original.
getPublicUriBySlot ( string $slot, TippingCanoe\Imager\Model\Imageable $imageable = null, array $filters = [] ) : string | null Returns an image URI based on the slot and imageable.
moveToSlot ( Image $image, $slot )
saveFromFile ( File $file, TippingCanoe\Imager\Model\Imageable $imageable = null, array $attributes = [] ) : null Saves a new image from a file found on the server's filesystem.
saveFromUri ( string $uri, TippingCanoe\Imager\Model\Imageable $imageable = null, array $attributes = [] ) : null Saves a new image from a file available via any of the standard PHP supported schemes.
useDriver ( $abstract ) Select which driver Imager uses by default.

Méthodes protégées

Méthode Description
createImageRecord ( File $image, array $attributes = [] ) : Image Create the database entry for an image.
getDriver ( null $abstract = null ) : TippingCanoe\Imager\Storage\Driver Gets the current or specified driver.
runFilters ( File $file, Image $image, array $filters = [] )
saveFile ( File $file, Image $image, array $filters = [] ) Pass a file save into the current Driver.

Method Details

__construct() public méthode

public __construct ( TippingCanoe\Imager\Repository\Image $imageRepository, Intervention\Image\ImageManager $intervention, Illuminate\Foundation\Application $app, array $storageDrivers )
$imageRepository TippingCanoe\Imager\Repository\Image
$intervention Intervention\Image\ImageManager
$app Illuminate\Foundation\Application
$storageDrivers array

batch() public méthode

public batch ( array $operations, array $files = null, TippingCanoe\Imager\Model\Imageable $imageable = null )
$operations array
$files array
$imageable TippingCanoe\Imager\Model\Imageable

createImageRecord() protected méthode

Create the database entry for an image.
protected createImageRecord ( File $image, array $attributes = [] ) : Image
$image Symfony\Component\HttpFoundation\File\File
$attributes array
Résultat TippingCanoe\Imager\Model\Image

delete() public méthode

public delete ( Image $image, array $filters = [] )
$image TippingCanoe\Imager\Model\Image
$filters array

deleteById() public méthode

public deleteById ( $id, array $filters = [] )
$id
$filters array

deleteBySlot() public méthode

public deleteBySlot ( $slot, TippingCanoe\Imager\Model\Imageable $imageable = null )
$imageable TippingCanoe\Imager\Model\Imageable

getById() public méthode

Simply retrieves an image by id.
public getById ( integer $id ) : Image
$id integer
Résultat TippingCanoe\Imager\Model\Image

getBySlot() public méthode

public getBySlot ( $slot, TippingCanoe\Imager\Model\Imageable $imageable = null ) : Image
$slot
$imageable TippingCanoe\Imager\Model\Imageable
Résultat TippingCanoe\Imager\Model\Image

getDriver() protected méthode

Gets the current or specified driver.
protected getDriver ( null $abstract = null ) : TippingCanoe\Imager\Storage\Driver
$abstract null
Résultat TippingCanoe\Imager\Storage\Driver

getPublicUri() public méthode

public getPublicUri ( Image $image, array $filters = [] ) : string
$image TippingCanoe\Imager\Model\Image
$filters array
Résultat string

getPublicUriById() public méthode

Returns an image URI based on the id of the original.
public getPublicUriById ( integer $id, array $filters = [] ) : string
$id integer
$filters array
Résultat string

getPublicUriBySlot() public méthode

Returns an image URI based on the slot and imageable.
public getPublicUriBySlot ( string $slot, TippingCanoe\Imager\Model\Imageable $imageable = null, array $filters = [] ) : string | null
$slot string
$imageable TippingCanoe\Imager\Model\Imageable
$filters array
Résultat string | null

moveToSlot() public méthode

public moveToSlot ( Image $image, $slot )
$image TippingCanoe\Imager\Model\Image

runFilters() protected méthode

protected runFilters ( File $file, Image $image, array $filters = [] )
$file Symfony\Component\HttpFoundation\File\File
$image TippingCanoe\Imager\Model\Image
$filters array

saveFile() protected méthode

Pass a file save into the current Driver.
protected saveFile ( File $file, Image $image, array $filters = [] )
$file Symfony\Component\HttpFoundation\File\File
$image TippingCanoe\Imager\Model\Image
$filters array

saveFromFile() public méthode

Saves a new image from a file found on the server's filesystem.
public saveFromFile ( File $file, TippingCanoe\Imager\Model\Imageable $imageable = null, array $attributes = [] ) : null
$file Symfony\Component\HttpFoundation\File\File
$imageable TippingCanoe\Imager\Model\Imageable
$attributes array
Résultat null

saveFromUri() public méthode

Saves a new image from a file available via any of the standard PHP supported schemes.
public saveFromUri ( string $uri, TippingCanoe\Imager\Model\Imageable $imageable = null, array $attributes = [] ) : null
$uri string
$imageable TippingCanoe\Imager\Model\Imageable
$attributes array
Résultat null

useDriver() public méthode

Select which driver Imager uses by default.
public useDriver ( $abstract )
$abstract

Property Details

$app protected_oe property

protected Application,Illuminate\Foundation $app
Résultat Illuminate\Foundation\Application

$currentDriver protected_oe property

protected Driver,TippingCanoe\Imager\Storage $currentDriver
Résultat TippingCanoe\Imager\Storage\Driver

$imageRepository protected_oe property

protected Image,TippingCanoe\Imager\Repository $imageRepository
Résultat TippingCanoe\Imager\Repository\Image

$intervention protected_oe property

protected ImageManager,Intervention\Image $intervention
Résultat Intervention\Image\ImageManager

$storageDrivers protected_oe property

protected Driver[],TippingCanoe\Imager\Storage $storageDrivers
Résultat TippingCanoe\Imager\Storage\Driver[]