PHP Class Plank\Mediable\UrlGenerators\UrlGeneratorFactory

Author: Sean Fraser ([email protected])
Exibir arquivo Open project: plank/laravel-mediable Class Usage Examples

Protected Properties

Property Type Description
$driver_generators array map of UrlGenerator classes to use for different filesystem drivers.

Public Methods

Method Description
create ( Media $media ) : UrlGenerator Get a UrlGenerator instance for a media.
setGeneratorForFilesystemDriver ( $class, string $driver ) : void Set a generator subclass to use for media on a disk with a particular driver.

Protected Methods

Method Description
getDriverForDisk ( string $disk ) : string Get the driver used by a specified disk.
validateGeneratorClass ( string $class ) : void Verify that a class name is a valid generator.

Method Details

create() public method

Get a UrlGenerator instance for a media.
public create ( Media $media ) : UrlGenerator
$media Plank\Mediable\Media
return UrlGenerator

getDriverForDisk() protected method

Get the driver used by a specified disk.
protected getDriverForDisk ( string $disk ) : string
$disk string
return string

setGeneratorForFilesystemDriver() public method

Set a generator subclass to use for media on a disk with a particular driver.
public setGeneratorForFilesystemDriver ( $class, string $driver ) : void
$driver string
return void

validateGeneratorClass() protected method

Verify that a class name is a valid generator.
protected validateGeneratorClass ( string $class ) : void
$class string
return void

Property Details

$driver_generators protected_oe property

map of UrlGenerator classes to use for different filesystem drivers.
protected array $driver_generators
return array