当前位置: 首页>>代码示例>>PHP>>正文


PHP Upload::__construct方法代码示例

本文整理汇总了PHP中Upload::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Upload::__construct方法的具体用法?PHP Upload::__construct怎么用?PHP Upload::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Upload的用法示例。


在下文中一共展示了Upload::__construct方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Sınıfı başlatır ve resim yüklenebilmesi için gerekli ortamı hazırlar
  *
  * @param array $file
  * @param string $target
  */
 public function __construct(array $file = [], $target = '')
 {
     parent::__construct($file, $target);
     $types = $this->getDefaultImageTypes();
     $this->setAllowedMimeTypes($types->getImageMimeTypes());
     $this->setAllowedExt($types->getImageTypeExt(), ['.php']);
 }
开发者ID:AnonymPHP,项目名称:Anonym-Upload,代码行数:13,代码来源:ImageUpload.php

示例2: __construct

 /**
  * Constructor
  *
  * @param string $name nombre de archivo por metodo POST
  */
 public function __construct($name)
 {
     parent::__construct($name);
     $this->_imgInfo = getimagesize($_FILES[$name]['tmp_name']);
     // Ruta donde se guardara el archivo
     $this->_path = dirname($_SERVER['SCRIPT_FILENAME']) . '/img/upload';
 }
开发者ID:Jamp,项目名称:sgas,代码行数:12,代码来源:image_upload.php

示例3: Rating

 function __construct()
 {
     parent::__construct();
     $this->commentRatingMngr = new Rating('commentRatings', 'comments');
     $this->commentMngr = new Comment_v0(1, GlobalMas::$filesPath_web);
     //FileFolder::delete(GlobalMas::$filesPath_absolute);
 }
开发者ID:awwthentic1234,项目名称:hey,代码行数:7,代码来源:CompileUpload.php

示例4: __construct

 public function __construct($arrAttributes = null)
 {
     // check against arrAttributes, as 'onsubmit_callback' => 'multifileupload_moveFiles' does not provide valid attributes
     if ($arrAttributes !== null && !$arrAttributes['uploadFolder']) {
         throw new \Exception(sprintf($GLOBALS['TL_LANG']['ERR']['noUploadFolderDeclared'], $this->name));
     }
     $arrAttributes['uploadAction'] = static::$uploadAction;
     if (TL_MODE == 'FE') {
         $arrAttributes['uploadActionParams'] = http_build_query(AjaxAction::getParams(MultiFileUpload::NAME, static::$uploadAction));
     }
     $arrAttributes['addRemoveLinks'] = isset($arrAttributes['addRemoveLinks']) ? $arrAttributes['addRemoveLinks'] : true;
     if (!is_array($arrAttributes['value']) && !Validator::isBinaryUuid($arrAttributes['value'])) {
         $arrAttributes['value'] = json_decode($arrAttributes['value']);
     }
     // bin to string -> never pass binary to the widget!!
     if ($arrAttributes['value']) {
         if (is_array($arrAttributes['value'])) {
             $arrAttributes['value'] = array_map(function ($val) {
                 return \Validator::isBinaryUuid($val) ? \StringUtil::binToUuid($val) : $val;
             }, $arrAttributes['value']);
         } else {
             $arrAttributes['value'] = array(\Validator::isBinaryUuid($arrAttributes['value']) ? \StringUtil::binToUuid($arrAttributes['value']) : $arrAttributes['value']);
         }
     }
     parent::__construct($arrAttributes);
     $this->objUploader = new MultiFileUpload($arrAttributes);
     // add onsubmit_callback: move files after form submission
     $GLOBALS['TL_DCA'][$this->strTable]['config']['onsubmit_callback']['multifileupload_moveFiles'] = array('HeimrichHannot\\MultiFileUpload\\FormMultiFileUpload', 'moveFiles');
     Ajax::runActiveAction(MultiFileUpload::NAME, MultiFileUpload::ACTION_UPLOAD, $this);
 }
开发者ID:heimrichhannot,项目名称:contao-multifileupload,代码行数:30,代码来源:FormMultiFileUpload.php

示例5: __construct

 public function __construct($config)
 {
     parent::__construct($config);
     $this->config = array("pathFormat" => $config['scrawlPathFormat'], "maxSize" => $config['scrawlMaxSize'], "allowFiles" => $config['scrawlAllowFiles'], "oriName" => "scrawl.png");
     $this->fieldName = $config['scrawlFieldName'];
     $this->base64 = "base64";
 }
开发者ID:AlusaChen,项目名称:test-lar,代码行数:7,代码来源:UploadScrawl.php

示例6: __construct

 /**
  * Constructor
  *
  * @param string $path chemin vers l'image
  * @param string $ext extention de l'image
  * @return void
  */
 public function __construct($name)
 {
     parent::__construct($name);
     $this->ext = $this->infos['extension'];
     if ($this->ext == 'jpg') {
         $this->ext = 'jpeg';
     }
     $this->maxsize = 512000;
     // 1MO
 }
开发者ID:arhe,项目名称:pwak,代码行数:17,代码来源:ImageManager.php

示例7: __construct

 /**
  * Método construtor
  * @param array $Files Files do arquivo. Ex.: $_FILES['arquivo']
  * @param string $destination Path completo do destino do arquivo
  * @param mixed $customRename Nome customizado para o arquivo
  */
 public function __construct($Files, $destination, $customRename = false)
 {
     parent::__construct($Files, $destination, $customRename);
 }
开发者ID:fernandopetry,项目名称:pwork,代码行数:10,代码来源:File.php

示例8: __construct

 /**
  * Constructor
  * 
  * @param string $name nombre de archivo por metodo POST
  */
 public function __construct($name)
 {
     parent::__construct($name);
     // Ruta donde se guardara el archivo
     $this->_path = dirname(APP_PATH) . '/public/files/upload';
 }
开发者ID:albertmolina,项目名称:Daily-Content-Manager,代码行数:11,代码来源:file_upload.php

示例9: __construct

 /**
  * Constructor
  *
  * @param string $name nombre de archivo por metodo POST
  */
 public function __construct($name)
 {
     parent::__construct($name);
     // Ruta donde se guardara el archivo
     $this->_path = dirname($_SERVER['SCRIPT_FILENAME']) . '/files/upload';
 }
开发者ID:Jamp,项目名称:sgas,代码行数:11,代码来源:file_upload.php

示例10: __construct

 public function __construct()
 {
     parent::__construct();
 }
开发者ID:johnlion,项目名称:hlsc,代码行数:4,代码来源:CiUpload.php

示例11: __construct

 public function __construct($config)
 {
     parent::__construct($config);
     $this->config = array("pathFormat" => $config['videoPathFormat'], "maxSize" => $config['videoMaxSize'], "allowFiles" => $config['videoAllowFiles']);
     $this->fieldName = $config['videoFieldName'];
 }
开发者ID:AlusaChen,项目名称:test-lar,代码行数:6,代码来源:UploadVideo.php

示例12: __construct

 /**
  * Método construtor
  * @param array $Files Files do arquivo. Ex.: $_FILES['arquivo']
  * @param string $destination Path completo do destino do arquivo
  * @param mixed $customRename Nome customizado para o arquivo
  */
 public function __construct($Files, $destination, $customRename = false)
 {
     parent::__construct($Files, $destination, $customRename);
     $this->detination = parent::getDestination() . '/' . parent::getNewName();
     $this->info = getimagesize(parent::getTmpName());
 }
开发者ID:fernandopetry,项目名称:pwork,代码行数:12,代码来源:Image.php

示例13: __construct

 /**
  * Requires data from validation class to avoid the need of reforming $_FILES array twice
  * @param object of type ValidateFile $validator
  * @param string $id - book id
  * @return object
  */
 public function __construct(ValidateFile $validator, $id)
 {
     parent::__construct($validator);
     $this->id = $id;
 }
开发者ID:adiachenko,项目名称:bookshop,代码行数:11,代码来源:UploadBookCover.php


注:本文中的Upload::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。