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


PHP UploadHandler::__construct方法代码示例

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


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

示例1:

 function __construct($app)
 {
     $this->app = $app;
     $this->folder = $app->config('image.repo');
     $uploadUrl = $app->config('image.repo.url');
     parent::__construct(array('upload_dir' => $this->folder, 'max_file_size' => 1 * 1024 * 1024));
 }
开发者ID:RodrigoBattagliero,项目名称:Cifras,代码行数:7,代码来源:UploadFileService.php

示例2: __construct

 public function __construct($options = null, $initialize = true, $error_messages = null)
 {
     $this->options = ['csrf_token' => ['name' => '_token', 'value' => csrf_token()], 'script_url' => \URL::current(), 'upload_dir' => dirname($this->get_server_var('SCRIPT_FILENAME')) . '/files/', 'upload_url' => $this->get_full_url() . '/files/'];
     if ($options) {
         $this->options = $options + $this->options;
     }
     parent::__construct($this->options, $initialize, $error_messages);
 }
开发者ID:alverated,项目名称:jQuery-File-Upload,代码行数:8,代码来源:FileUpload.php

示例3: array

 function __construct($options = null)
 {
     //izveido direktoriju
     $options['upload_dir'] = self::getUploadDirPath($options['model_name']);
     $options['accept_file_types'] = Yii::app()->getModule('d1files')->accept_file_types;
     //lai netaisa thumb...
     $options['image_versions'] = array();
     parent::__construct($options, TRUE);
 }
开发者ID:dbrisinajumi,项目名称:d1files,代码行数:9,代码来源:UploadHandlerD1files.php

示例4:

 /**
  * 
  * UploaderHandler Overrides
  *
  */
 function __construct($options)
 {
     $error_messages = \Lang::file('juploader', \Config::get('application.language'), 'errors');
     if (count($error_messages) == 0) {
         $error_messages = \Lang::file('juploader', 'en', 'errors');
     }
     if (count($error_messages) > 0) {
         $this->error_messages = $error_messages;
     }
     parent::__construct($options, true);
 }
开发者ID:ajayvaineela,项目名称:laravel-juploader,代码行数:16,代码来源:BaseUploadHandler.php

示例5: __construct

 public function __construct($delete_url, $options)
 {
     $this->delete_url = $delete_url;
     $opts = CustomUploadHandler::getDefaultOptions();
     if (array_key_exists('image_versions', $options) && is_null($options['image_versions'])) {
         $options['image_versions'] = array();
     }
     if (array_key_exists('upload_dir', $options)) {
         $options['upload_url'] = $this->getFullUrl() . '/' . $options['upload_dir'];
         $options['upload_dir'] = dirname($_SERVER['SCRIPT_FILENAME']) . '/' . $options['upload_dir'];
     }
     if ($options != null) {
         $opts = array_merge($opts, $options);
     }
     parent::__construct($opts, false, null);
 }
开发者ID:ami-m,项目名称:VxJsUploadBundle,代码行数:16,代码来源:CustomUploadHandler.php

示例6: __construct

 public function __construct()
 {
     $uploads = wp_upload_dir();
     parent::__construct(array('script_url' => self::get_action_url('upfront-media-upload'), 'upload_dir' => trailingslashit($uploads['path']), 'upload_url' => trailingslashit($uploads['url']), 'param_name' => 'media'), false);
 }
开发者ID:sedici,项目名称:wpmu-istec,代码行数:5,代码来源:class_upfront_upload_handler.php

示例7: __construct

 public function __construct($src, $behaviours)
 {
     parent::__construct($src, array(array($this, 'handleUpload')));
     $this->behaviours[self::UPLOAD_DIRECTORY] = TH_ROOT . TH_UPLOADS;
     $this->behaviours = $this->behaviours + $behaviours;
     $this->addCallback(array($this, 'handleUpload'));
 }
开发者ID:alecgorge,项目名称:TopHat,代码行数:7,代码来源:cc-uploadify.php

示例8:

 function __construct($options = null, $initialize = true, $error_messages = null)
 {
     parent::__construct($options, $initialize, $error_messages);
 }
开发者ID:mehulsbhatt,项目名称:MDIgniter,代码行数:4,代码来源:fileuploader.php

示例9: __construct

 public function __construct($options = null, $initialize = true, $error_messages = null)
 {
     parent::__construct($options, $initialize, $error_messages);
     $this->error_messages['accept_file_types'] = 'Filetype not allowed (allowed extensions: .gif, .jpg, .jpeg, .png)';
 }
开发者ID:web-feet,项目名称:coasterframework,代码行数:5,代码来源:GalleryUploadHandler.php

示例10:

 function __construct($options = null)
 {
     parent::__construct(null, false, null);
     $this->options_default = $this->options;
 }
开发者ID:yfix,项目名称:yf,代码行数:5,代码来源:yf_upload_handler.class.php

示例11: __construct

 public function __construct($params)
 {
     $this->hash = $params['hash'];
     $this->id_vendor = $params['id_vendor'];
     parent::__construct($options = $params['my_options'], $initialize = $params['my_initialize'], $error_messages = $params['my_error_messages']);
 }
开发者ID:sanul17,项目名称:higoapps,代码行数:6,代码来源:My_UploadHandler.php

示例12:

 function __construct($options = null, $initialize = true)
 {
     parent::__construct($options, $initialize);
 }
开发者ID:big2men,项目名称:qhm,代码行数:4,代码来源:SkinCustomizer_UploadHandler.php


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