mojavi
[ class tree: mojavi ] [ index: mojavi ] [ all elements ]

Class: WebRequest

Source Location: /request/WebRequest.class.php

Class Overview

ParameterHolder
   |
   --Request
      |
      --WebRequest

WebRequest provides additional support for web-only client requests such as cookie and file manipulation.


Author(s):

  • Sean Kerr (skerr@mojavi.org)

Version:

  • $Id: WebRequest.class.php 644 2004-12-10 14:29:11Z seank $

Copyright:

Methods


Inherited Constants

Inherited Variables

Inherited Methods

Class: Request

Request::clearAttributes()
Clear all attributes associated with this request.
Request::extractParameters()
Extract parameter values from the request.
Request::getAttribute()
Retrieve an attribute.
Request::getAttributeNames()
Retrieve an array of attribute names.
Request::getError()
Retrieve an error message.
Request::getErrorNames()
Retrieve an array of error names.
Request::getErrors()
Retrieve an array of errors.
Request::getMethod()
Retrieve this request's method.
Request::hasAttribute()
Indicates whether or not an attribute exists.
Request::hasError()
Indicates whether or not an error exists.
Request::hasErrors()
Indicates whether or not any errors exist.
Request::initialize()
Initialize this Request.
Request::newInstance()
Retrieve a new Request implementation instance.
Request::removeAttribute()
Remove an attribute.
Request::removeError()
Remove an error.
Request::setAttribute()
Set an attribute.
Request::setAttributeByRef()
Set an attribute by reference.
Request::setAttributes()
Set an array of attributes.
Request::setAttributesByRef()
Set an array of attributes by reference.
Request::setError()
Set an error.
Request::setErrors()
Set an array of errors
Request::setMethod()
Set the request method.
Request::shutdown()
Execute the shutdown procedure.

Class: ParameterHolder

ParameterHolder::clearParameters()
Clear all parameters associated with this request.
ParameterHolder::getParameter()
Retrieve a parameter.
ParameterHolder::getParameterNames()
Retrieve an array of parameter names.
ParameterHolder::getParameters()
Retrieve an array of parameters.
ParameterHolder::hasParameter()
Indicates whether or not a parameter exists.
ParameterHolder::removeParameter()
Remove a parameter.
ParameterHolder::setParameter()
Set a parameter.
ParameterHolder::setParameterByRef()
Set a parameter by reference.
ParameterHolder::setParameters()
Set an array of parameters.
ParameterHolder::setParametersByRef()
Set an array of parameters by reference.

Class Details

[line 24]
WebRequest provides additional support for web-only client requests such as cookie and file manipulation.



Tags:

version:  $Id: WebRequest.class.php 644 2004-12-10 14:29:11Z seank $
since:  3.0.0
copyright:  (c) Sean Kerr, http://www.mojavi.org
author:  Sean Kerr (skerr@mojavi.org)


[ Top ]


Class Methods


method getFile [line 42]

array getFile( string $name)

Retrieve an array of file information.



Tags:

return:  An associative array of file information, if the file exists, otherwise null.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


Parameters:

string   $name   A file name

[ Top ]

method getFileError [line 79]

int getFileError( string $name)

Retrieve a file error.



Tags:

return:  

One of the following error codes:

  • UPLOAD_ERR_OK (no error)
  • UPLOAD_ERR_INI_SIZE (the uploaded file exceeds the upload_max_filesize directive in php.ini)
  • UPLOAD_ERR_FORM_SIZE (the uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form)
  • UPLOAD_ERR_PARTIAL (the uploaded file was only partially uploaded)
  • UPLOAD_ERR_NO_FILE (no file was uploaded)

access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


Parameters:

string   $name   A file name.

[ Top ]

method getFileName [line 105]

string getFileName( string $name)

Retrieve a file name.



Tags:

return:  A file name, if the file exists, otherwise null.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


Parameters:

string   $name   A file name.

[ Top ]

method getFileNames [line 129]

array getFileNames( )

Retrieve an array of file names.



Tags:

return:  An indexed array of file names.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


[ Top ]

method getFilePath [line 165]

string getFilePath( string $name)

Retrieve a file path.



Tags:

return:  A file path, if the file exists, otherwise null.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


Parameters:

string   $name   A file name.

[ Top ]

method getFiles [line 146]

array getFiles( )

Retrieve an array of files.



Tags:

return:  An associative array of files.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


[ Top ]

method getFileSize [line 191]

int getFileSize( string $name)

Retrieve a file size.



Tags:

return:  A file size, if the file exists, otherwise null.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


Parameters:

string   $name   A file name.

[ Top ]

method getFileType [line 220]

string getFileType( string $name)

Retrieve a file type.

This may not be accurate. This is the mime-type sent by the browser during the upload.




Tags:

return:  A file type, if the file exists, otherwise null.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


Parameters:

string   $name   A file name.

[ Top ]

method hasFile [line 246]

bool hasFile( string $name)

Indicates whether or not a file exists.



Tags:

return:  true, if the file exists, otherwise false.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


Parameters:

string   $name   A file name.

[ Top ]

method hasFileError [line 265]

bool hasFileError( string $name)

Indicates whether or not a file error exists.



Tags:

return:  true, if the file error exists, otherwise false.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


Parameters:

string   $name   A file name.

[ Top ]

method hasFileErrors [line 289]

bool hasFileErrors( )

Indicates whether or not any file errors occured.



Tags:

return:  true, if any file errors occured, otherwise false.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


[ Top ]

method hasFiles [line 318]

bool hasFiles( )

Indicates whether or not any files exist.



Tags:

return:  true, if any files exist, otherwise false.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


[ Top ]

method initialize [line 342]

bool initialize( Context $context, [array $parameters = null])

Initialize this Request.



Tags:

return:  true, if initialization completes successfully, otherwise false.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)
throws:  InitializationException If an error occurs while initializing this Request.


Overrides Request::initialize() (Initialize this Request.)

Parameters:

Context   $context   A Context instance.
array   $parameters   An associative array of initialization parameters.

[ Top ]

method moveFile [line 458]

bool moveFile( string $name, string $file, [int $fileMode = 0666], [bool $create = true], [int $dirMode = 0777])

Move an uploaded file.



Tags:

return:  true, if the file was moved, otherwise false.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)
throws:  FileException If a major error occurs while attempting to move the file.


Parameters:

string   $name   A file name.
string   $file   An absolute filesystem path to where you would like the file moved. This includes the new filename as well, since uploaded files are stored with random names.
int   $fileMode   The octal mode to use for the new file.
bool   $create   Indicates that we should make the directory before moving the file.
int   $dirMode   The octal mode to use when creating the directory.

[ Top ]

method shutdown [line 535]

void shutdown( )

Execute the shutdown procedure.



Tags:

access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


Overrides Request::shutdown() (Execute the shutdown procedure.)

[ Top ]


Documentation generated on Tue, 21 Feb 2006 01:45:32 +0900 by phpDocumentor 1.3.0RC5