Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Blob.php
Go to the documentation of this file.
1 <?php
7 
9 
13 class Blob implements FactoryInterface
14 {
18  const DEFAULT_BLOB_LENGTH = 65536;
19 
23  private $objectManager;
24 
28  private $className;
29 
36  public function __construct(
37  ObjectManagerInterface $objectManager,
38  $className = \Magento\Framework\Setup\Declaration\Schema\Dto\Columns\Blob::class
39  ) {
40  $this->objectManager = $objectManager;
41  $this->className = $className;
42  }
43 
47  public function create(array $data)
48  {
49  if (!isset($data['length'])) {
50  $data['length'] = self::DEFAULT_BLOB_LENGTH;
51  }
52 
53  return $this->objectManager->create($this->className, $data);
54  }
55 }
$objectManager
Definition: bootstrap.php:17
__construct(ObjectManagerInterface $objectManager, $className=\Magento\Framework\Setup\Declaration\Schema\Dto\Columns\Blob::class)
Definition: Blob.php:36