This class gives a common basis to realized gateway based storage dispatching. It is intended to deal as a base class for FieldType storages, giving a common infrastructure to handle multiple gateways, based on the context provided by the SPI. The method {@link getGateway()} is used in derived classes to retrieve the correct gateway implementation, based on the context.
Наследование: implements eZ\Publish\SPI\FieldType\FieldStorage
 /**
  * Construct from gateways
  *
  * @param \eZ\Publish\Core\FieldType\StorageGateway[] $gateways
  * @param IOServiceInterface $IOService
  * @param PathGenerator $pathGenerator
  * @param MimeTypeDetector $mimeTypeDetector
  */
 public function __construct(array $gateways, IOServiceInterface $IOService, PathGenerator $pathGenerator, MimeTypeDetector $mimeTypeDetector)
 {
     parent::__construct($gateways);
     $this->IOService = $IOService;
     $this->pathGenerator = $pathGenerator;
     $this->mimeTypeDetector = $mimeTypeDetector;
 }
Пример #2
0
 public function __construct(array $gateways, IOServiceInterface $IOService, PathGenerator $pathGenerator, MetadataHandler $imageSizeMetadataHandler, DeprecationWarner $deprecationWarner, AliasCleanerInterface $aliasCleaner = null)
 {
     parent::__construct($gateways);
     $this->IOService = $IOService;
     $this->pathGenerator = $pathGenerator;
     $this->imageSizeMetadataHandler = $imageSizeMetadataHandler;
     $this->deprecationWarner = $deprecationWarner;
     $this->aliasCleaner = $aliasCleaner;
 }
Пример #3
0
 /**
  * @param \eZ\Publish\Core\FieldType\StorageGateway[] $gateways
  * @param \Psr\Log\LoggerInterface $logger
  */
 public function __construct(array $gateways = array(), LoggerInterface $logger = null)
 {
     parent::__construct($gateways);
     $this->logger = $logger;
 }