Gc\Media\File::load PHP Method

load() public method

Initiliaze File Object
public load ( Model $property, Model $document, string $filename = null ) : void
$property Gc\Property\Model Property
$document Gc\Document\Model Document
$filename string Filename
return void
    public function load(PropertyModel $property, DocumentModel $document, $filename = null)
    {
        $this->setProperty($property);
        $this->setDocument($document);
        $this->setFileName($filename);
    }

Usage Example

Beispiel #1
0
 /**
  * Initiliaze files
  *
  * @return void
  */
 protected function initializeFiles()
 {
     $_FILES = array('test' => array('name' => __DIR__ . '/_files/test.jpg', 'type' => 'plain/text', 'size' => 8, 'tmp_name' => __DIR__ . '/_files/test.jpg', 'error' => 0));
     $property = PropertyModel::fromArray(array('id' => 'test-upload'));
     $document = DocumentModel::fromArray(array('id' => 'test-upload'));
     $this->object->load($property, $document, 'test');
 }
All Usage Examples Of Gc\Media\File::load