FileUpload::__construct PHP Method

__construct() public method

public __construct ( $name, $target, $type = '*', $size = '2048' )
    public function __construct($name, $target, $type = '*', $size = '2048')
    {
        if (is_array($name)) {
            $this->instance = CUploadedFile::getInstance($name[0], $name[1]);
        } else {
            $this->instance = CUploadedFile::getInstanceByName($name);
        }
        $this->type = $type;
        $this->target = $target;
        $this->setSize($size);
    }

Usage Example

Esempio n. 1
0
 public function __construct($name)
 {
     parent::__construct();
     $this->setName($name);
     $this->extensions = trimsplit(',', strtolower($GLOBALS['TL_CONFIG']['uploadTypes']));
     $this->maxFileSize = $GLOBALS['TL_CONFIG']['maxFileSize'];
     $this->imageWidth = $GLOBALS['TL_CONFIG']['imageWidth'];
     $this->imageHeight = $GLOBALS['TL_CONFIG']['imageHeight'];
     $this->gdMaxImgWidth = $GLOBALS['TL_CONFIG']['gdMaxImgWidth'];
     $this->gdMaxImgHeight = $GLOBALS['TL_CONFIG']['gdMaxImgHeight'];
 }
All Usage Examples Of FileUpload::__construct