Hawk - PHP documentation
  • Namespace
  • Class
  • Tree

Namespaces

  • Hawk
    • View
      • Plugins

Classes

  • App
  • ButtonInput
  • Cache
  • CheckboxInput
  • ColorInput
  • Conf
  • Controller
  • Crypto
  • DatabaseSessionHandler
  • DatetimeInput
  • DB
  • DBExample
  • DeleteInput
  • Dialogbox
  • EmailInput
  • ErrorHandler
  • Event
  • FileInput
  • FileSystem
  • FloatInput
  • Form
  • FormFieldset
  • FormInput
  • GenericModel
  • GifImage
  • HawkApi
  • HawkUpdater
  • HiddenInput
  • HtmlInput
  • HTTPRequest
  • Icon
  • Image
  • IntegerInput
  • ItemList
  • ItemListField
  • JpegImage
  • Lang
  • Language
  • LeftSidebarTab
  • Less
  • Logger
  • Mail
  • MenuItem
  • Model
  • NoSidebarTab
  • NumberInput
  • ObjectInput
  • Option
  • Panel
  • PasswordInput
  • Permission
  • Plugin
  • PluginInstaller
  • PngImage
  • ProfileQuestion
  • ProfileQuestionValue
  • RadioInput
  • Request
  • Response
  • RightSidebarTab
  • Role
  • RolePermission
  • Route
  • Router
  • SelectInput
  • Session
  • Singleton
  • SubmitInput
  • Tabs
  • TextareaInput
  • TextInput
  • Theme
  • TimeInput
  • Upload
  • User
  • View
  • ViewPlugin
  • Widget
  • WysiwygInput

Traits

  • Utils

Exceptions

  • AppStopException
  • DBExampleException
  • DBException
  • FileSystemException
  • HawkApiException
  • ImageException
  • MailException
  • UploadException
  • ViewException

Class Upload

This class permits to treat AJAX uploads

Namespace: Hawk
Package: Core
Located at Upload.php

Methods summary

public static Hawk\Upload
# getInstance( string $name )

Get an upload instance by the name of the uplaod

Get an upload instance by the name of the uplaod

Parameters

$name
the name of the upload

Returns

Hawk\Upload
The upload instance
public array
# getFiles( )

Get the uploaded files

Get the uploaded files

Returns

array
The uploaded files, where each element is a StdClass instance containing the properties : basename, tmpFile, mime, size and extension
public StdClass
# getFile( integer $index = 0 )

Get one of the uploaded files.

Get one of the uploaded files.

Parameters

$index
The index of the uploaded files to get. If not set, this function will return the first (or the only one) uploaded file

Returns

StdClass
The uploaded file at the given index
public boolean
# move( StdClass $file, string $directory, string $basename = null )

Move a uploaded file to a directory

Move a uploaded file to a directory

Parameters

$file
The file to move
$directory
The directory where to move the file
$basename
The basename to apply for the moved file

Returns

boolean
True if the operation has been computed successfully, and False if an error occured
Hawk - PHP documentation API documentation generated by ApiGen