__construct() публичный Метод

Constructs an asset. The resource is set internally and then initialize() is called.
public __construct ( PersistentResource $resource )
$resource Neos\Flow\ResourceManagement\PersistentResource
Пример #1
0
 /**
  * Constructs the object and sets default values for width and height
  *
  * @param PersistentResource $resource
  */
 public function __construct(PersistentResource $resource)
 {
     parent::__construct($resource);
     $this->width = -1;
     $this->height = -1;
 }
Пример #2
0
 /**
  * Constructor
  *
  * @param PersistentResource $resource
  */
 public function __construct(PersistentResource $resource)
 {
     parent::__construct($resource);
     $this->variants = new ArrayCollection();
 }