本文整理汇总了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));
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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'));
}
示例8:
function __construct($options = null, $initialize = true, $error_messages = null)
{
parent::__construct($options, $initialize, $error_messages);
}
示例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)';
}
示例10:
function __construct($options = null)
{
parent::__construct(null, false, null);
$this->options_default = $this->options;
}
示例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']);
}
示例12:
function __construct($options = null, $initialize = true)
{
parent::__construct($options, $initialize);
}