PHP Class KickAssets_FileRequest

Author: Uncle Cheese ([email protected])
Inheritance: extends RequestHandler
Afficher le fichier Open project: unclecheese/silverstripe-kickassets Class Usage Examples

Protected Properties

Свойство Type Description
$file File The file that this controller will be editing/reading/deleting
$parent KickAssets The parent controller

Méthodes publiques

Méthode Description
__construct ( KickAssets $parent, File $file ) Constructor, sets the parent and file
handleDelete ( SS_HTTPRequest $r ) : SS_HTTPResponse Deletes the file bound to this controller
handleRead ( SS_HTTPRequest $r ) : SS_HTTPResponse Serves up the details for the file bound to this controller
handleUpdate ( SS_HTTPRequest $r ) : SS_HTTPResponse Applies edits to the file bound to this controller

Méthodes protégées

Méthode Description
JSONResponse ( array $json = null ) Helper method for generating an HTTPResponse based on given JSON
buildJSON ( ) : array Adds new properties to the parent (KickAssets) file JSON

Method Details

JSONResponse() protected méthode

Helper method for generating an HTTPResponse based on given JSON
protected JSONResponse ( array $json = null )
$json array

__construct() public méthode

Constructor, sets the parent and file
public __construct ( KickAssets $parent, File $file )
$parent KickAssets
$file File

buildJSON() protected méthode

Adds new properties to the parent (KickAssets) file JSON
protected buildJSON ( ) : array
Résultat array

handleDelete() public méthode

Deletes the file bound to this controller
public handleDelete ( SS_HTTPRequest $r ) : SS_HTTPResponse
$r SS_HTTPRequest
Résultat SS_HTTPResponse

handleRead() public méthode

Serves up the details for the file bound to this controller
public handleRead ( SS_HTTPRequest $r ) : SS_HTTPResponse
$r SS_HTTPRequest
Résultat SS_HTTPResponse

handleUpdate() public méthode

Applies edits to the file bound to this controller
public handleUpdate ( SS_HTTPRequest $r ) : SS_HTTPResponse
$r SS_HTTPRequest
Résultat SS_HTTPResponse

Property Details

$file protected_oe property

The file that this controller will be editing/reading/deleting
protected File $file
Résultat File

$parent protected_oe property

The parent controller
protected KickAssets $parent
Résultat KickAssets