PHP Class Ansel_View_Upload, horde

Copyright 2010-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.
Author: Michael J Rubinsky ([email protected])
Exibir arquivo Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_forceNoScript boolean Force the older, non-javascript uploader view.
$_gallery Ansel_Gallery
$_haveCarousel boolean Flag for when we already output the carousel code.
$_params array

Public Methods

Method Description
__construct ( array $params = [] ) Initialize the view. Needs the following parameters:
  'browse_button' - Dom id of button to open file system browser.    
handleLegacy ( ) Handle uploads from non-js browsers
run ( )

Protected Methods

Method Description
_doCarouselSetup ( ) : string Return javascript needed to initialize the carousel.
_handleFileUpload ( ) Checks for a file uploaded via the pluploader. If one is found, handle it, send the server json response and exit.
_isMetaFile ( string $filename ) : boolean Indicates if the specified filename is a known meta file type.

Private Methods

Method Description
_handleZip ( string $filename ) : array Handle extracting images from uploaded zip files.

Method Details

__construct() public method

'target' - Url of the target page to upload images to. 'drop_target' - Dom id of the element to receive drag and drop images (If runtime supports it). 'gallery' - The gallery id we are uploading to.
public __construct ( array $params = [] )
$params array

_doCarouselSetup() protected method

Return javascript needed to initialize the carousel.
protected _doCarouselSetup ( ) : string
return string The javascript code.

_handleFileUpload() protected method

Checks for a file uploaded via the pluploader. If one is found, handle it, send the server json response and exit.
protected _handleFileUpload ( )

_isMetaFile() protected method

Indicates if the specified filename is a known meta file type.
protected _isMetaFile ( string $filename ) : boolean
$filename string
return boolean

handleLegacy() public method

Handle uploads from non-js browsers
public handleLegacy ( )

run() public method

public run ( )

Property Details

$_forceNoScript protected_oe property

Force the older, non-javascript uploader view.
protected bool $_forceNoScript
return boolean

$_haveCarousel protected_oe property

Flag for when we already output the carousel code.
protected bool $_haveCarousel
return boolean

$_params protected_oe property

protected array $_params
return array