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

public __construct ( $name, $target, $type = '*', $size = '2048' )
Пример #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'];
 }
Пример #2
0
 public function __construct($opts, $form)
 {
     parent::__construct($opts, $form);
     // make sure we have the thumb_path, if not default it to the upload path
     if ($this->make_thumb === true) {
         if ($this->thumb_path == null) {
             $this->thumb_path = $this->upload_path;
         }
         if ($this->thumb_name == null) {
             throw new \Exception('Thumb name not set for ' . $this->name);
         }
     }
 }
 public function __construct($arrAttributes)
 {
     parent::__construct();
     $this->arrData = $arrAttributes;
     $file = \Input::get('file', true);
     // Send the file to the browser
     if ($file != '') {
         if (!static::isAllowedDownload($file)) {
             header('HTTP/1.1 403 Forbidden');
             die('No file access.');
         }
         \Controller::sendFileToBrowser($file);
     }
     global $objPage;
     $this->blnIsXhtml = $objPage->outputFormat == 'xhtml';
     $this->loadDcaConfig();
 }
Пример #4
0
 public function __construct($arrAttributes)
 {
     parent::__construct();
     $this->arrData = $arrAttributes;
     $this->strName = $arrAttributes['name'];
 }