Class WFYAHOO_widget_Uploader

Description

Implements interfaces:

This widget allows easy bulk uploading from the desktop to the web server with the YUI Uploader Flash widget. Requires Flash 9.

To use, simply add a WFYAHOO_widget_Uploader instance, as a child of a WFForm, to your page. Then, place the widget on your page {WFView id="myUploaderId"}. There is no need to wrap the widget inside the form in the HTML template.

All you need to do to receive the uploaded files is create a single function to handle the uploaded file. When someone uploads file(s) through the bulk uploader, your module's hasUploadCallback will be called, once for each file uploaded. From this function you can do as you please with each uploaded file.

PHOCOA Builder Setup:

Required:

Optional:
allowMultiple addButtonLabel uploadButtonLabel continueURL

Located in /framework/widgets/yahoo/WFYAHOO_widget_Uploader.php (line 29)

WFObject
   |
   --WFView
      |
      --WFWidget
         |
         --WFYAHOO
            |
            --WFYAHOO_widget_Uploader
Variable Summary
Method Summary
WFYAHOO_widget_Uploader __construct ( $id,  $page)
void getForm ()
void hasUpload ()
void initJS ( $blockContent)
void mimeType ()
void render ([ $blockContent = NULL])
void restoreState ()
void setContinueURL ( $url)
void setHasUploadCallback (mixed $callback)
void tmpFileName ()
Variables
string $addButtonLabel (line 38)
  • var: The label used on the "Add Files" button.
  • access: protected
boolean $allowMultiple (line 34)
  • var: Allow multiple uploads? Default: FALSE
  • access: protected
string $continueURL (line 46)
  • var: The URL to redirect the user to once the upload has completed. Default: NULL (no redirect).
  • access: protected
mixed $hasUploadCallback (line 67)
  • var: A valid php callback object that will be called on each uploaded file. The prototype is: void handleUploadedFile($page, $params, object WFYAHOO_widget_Uploader).
  • access: protected
string $mimeType (line 55)
  • var: The mime type of the uploaded file. This is the mime-type reported by the browser, so remember that it can be faked!
  • access: protected
string $originalFileName (line 59)
  • var: The name of the actual file.
  • access: protected
string $tmpFileName (line 51)
  • var: The temp file name of the uploaded file.
  • access: protected
string $uploadButtonLabel (line 42)
  • var: The label used on the "Start Upload" button.
  • access: protected

Inherited Variables

Inherited from WFYAHOO

WFYAHOO::$initializeWaitsForID

Inherited from WFWidget

WFWidget::$bindings
WFWidget::$class
WFWidget::$errors
WFWidget::$formatter
WFWidget::$hasRestoredState
WFWidget::$hidden
WFWidget::$name
WFWidget::$value
WFWidget::$widgetLabel

Inherited from WFView

WFView::$children
WFView::$cssImports
WFView::$enabled
WFView::$id
WFView::$importInHead
WFView::$jsActions
WFView::$jsEvents
WFView::$jsImports
WFView::$originalOnEvent
WFView::$page
WFView::$parent
Methods
Constructor __construct (line 73)

Constructor.

WFYAHOO_widget_Uploader __construct ( $id,  $page)
  • $id
  • $page

Redefinition of:
WFYAHOO::__construct()
Constructor.
getForm (line 85)
void getForm ()

Redefinition of:
WFView::getForm()
Get the form associated with this element, if there is one.
handleUploadedFile (line 133)
void handleUploadedFile ()
hasUpload (line 128)
void hasUpload ()
initJS (line 205)
void initJS ( $blockContent)
  • $blockContent

Redefinition of:
WFYAHOO::initJS()
The initJS function is where YUI widgets perform their bootstrap/initialization.
mimeType (line 123)
void mimeType ()

Implementation of:
WFUploadedFile::mimeType()
originalFileName (line 118)
void originalFileName ()

Implementation of:
WFUploadedFile::originalFileName()
render (line 182)
void render ([ $blockContent = NULL])
  • $blockContent

Redefinition of:
WFYAHOO::render()
IMPORTANT: The subclasses should get the base class's html, then add the needed code.
restoreState (line 149)
void restoreState ()

Redefinition of:
WFWidget::restoreState()
Restore the UI state of this widget from the $_REQUEST data.
setContinueURL (line 92)
void setContinueURL ( $url)
  • $url
setHasUploadCallback (line 103)

Set the callback function to be used to process the uploaded file.

  • throws: object Exception
void setHasUploadCallback (mixed $callback)
  • mixed $callback: String: the method of the current page delegate to call. Array: a php callback.
tmpFileName (line 113)
void tmpFileName ()

Implementation of:
WFUploadedFile::tmpFileName()

Inherited Methods

Inherited From WFYAHOO

WFYAHOO::__construct()
WFYAHOO::canPushValueBinding()
WFYAHOO::initJS()
WFYAHOO::jsForSimplePropertyConfig()
WFYAHOO::jsValueForValue()
WFYAHOO::render()
WFYAHOO::yuiloader()

Inherited From WFWidget

WFWidget::__construct()
WFWidget::addError()
WFWidget::bind()
WFWidget::bindingByName()
WFWidget::bindings()
WFWidget::canPushValueBinding()
WFWidget::errors()
WFWidget::exposedBindings()
WFWidget::exposedProperties()
WFWidget::formattedValue()
WFWidget::formatter()
WFWidget::hasRestoredState()
WFWidget::hidden()
WFWidget::name()
WFWidget::processBindingOptions()
WFWidget::propagateValueToBinding()
WFWidget::pullBindings()
WFWidget::pushBindings()
WFWidget::restoreState()
WFWidget::setFormatter()
WFWidget::setHidden()
WFWidget::setName()
WFWidget::setupExposedBindings()
WFWidget::setValue()
WFWidget::setWidgetLabel()
WFWidget::unbind()
WFWidget::value()
WFWidget::valueForBinding()
WFWidget::widgetLabel()

Inherited From WFView

WFView::__construct()
WFView::addChild()
WFView::allConfigFinishedLoading()
WFView::children()
WFView::cloneWithID()
WFView::enabled()
WFView::exposedProperties()
WFView::getForm()
WFView::getJSActions()
WFView::getListenerJS()
WFView::getListenerJSInScriptTag()
WFView::getOnEvent()
WFView::getWidgetDir()
WFView::getWidgetWWWDir()
WFView::id()
WFView::importCSS()
WFView::importJS()
WFView::jsEndHTML()
WFView::jsStartHTML()
WFView::page()
WFView::parent()
WFView::removeChild()
WFView::render()
WFView::setEnabled()
WFView::setId()
WFView::setJSonBlur()
WFView::setJSonClick()
WFView::setListener()
WFView::setOnEvent()
WFView::setParent()
WFView::yuiPath()

Inherited From WFObject

WFObject::__construct()
WFObject::exposedProperties()
WFObject::getClass()
WFObject::keyPathToTargetAndKey()
WFObject::setValueForKey()
WFObject::setValueForKeyPath()
WFObject::validateValueForKey()
WFObject::validateValueForKeyPath()
WFObject::valueForKey()
WFObject::valueForKeyPath()
WFObject::valueForUndefinedKey()
WFObject::__toString()

Documentation generated on Wed, 12 Nov 2008 23:46:30 -0500 by phpDocumentor 1.4.1