PHP Class Endpoint_REST, atk4

Inheritance: extends AbstractModel
显示文件 Open project: atk4/atk4

Public Properties

Property Type Description
$allow_add
$allow_delete
$allow_edit
$allow_list
$allow_list_one
$authenticate authenticated user
$doc_url @codingStandardsIgnoreEnd
$id_field
$model_class
$user
$user_id_field

Public Methods

Method Description
delete ( ) : boolean [delete description].
get ( ) : array [get description].
head ( ) : array see get().
init ( ) init.
patch ( array $data ) : array See put().
post ( array $data ) : array Create a new entry in the collection. The new entry's URI is assigned automatically and is usually returned by the operation.
put ( array $data ) : array Replace the addressed member of the collection, or if it doesn't exist, create it.
put_post ( array $data ) : array Because it's not really defined which of the two is used for updating the resource, Agile Toolkit will support put_post identically. Both of the requests are idempotent.

Protected Methods

Method Description
_input ( array $data, boolean $filter = true ) : array Filtering input data.
_model ( ) : Model Method returns new instance of the model we will operate on. Instead of using this method, you can use $this->model instead.
outputMany ( object | array $data ) : array Generic outptu filtering method for multiple records of data.
outputOne ( object | array $data ) : array Generic method for returning single record item of data, which can be used for filtering or cleaning up.

Method Details

_input() protected method

Filtering input data.
protected _input ( array $data, boolean $filter = true ) : array
$data array
$filter boolean
return array

_model() protected method

Method returns new instance of the model we will operate on. Instead of using this method, you can use $this->model instead.
protected _model ( ) : Model
return Model

delete() public method

[delete description].
public delete ( ) : boolean
return boolean

get() public method

[get description].
public get ( ) : array
return array

head() public method

see get().
public head ( ) : array
return array

init() public method

init.
public init ( )

outputMany() protected method

Generic outptu filtering method for multiple records of data.
protected outputMany ( object | array $data ) : array
$data object | array
return array

outputOne() protected method

Generic method for returning single record item of data, which can be used for filtering or cleaning up.
protected outputOne ( object | array $data ) : array
$data object | array
return array

patch() public method

See put().
public patch ( array $data ) : array
$data array
return array

post() public method

Create a new entry in the collection. The new entry's URI is assigned automatically and is usually returned by the operation.
public post ( array $data ) : array
$data array POST Data
return array

put() public method

Replace the addressed member of the collection, or if it doesn't exist, create it.
public put ( array $data ) : array
$data array
return array

put_post() public method

As you extend this class and redefine methods, you should properly use POST or PUT. See http://stackoverflow.com/a/2691891/204819
public put_post ( array $data ) : array
$data array
return array

Property Details

$allow_add public_oe property

public $allow_add

$allow_delete public_oe property

public $allow_delete

$allow_edit public_oe property

public $allow_edit

$allow_list public_oe property

public $allow_list

$allow_list_one public_oe property

public $allow_list_one

$authenticate public_oe property

authenticated user
public $authenticate

$doc_url public_oe property

@codingStandardsIgnoreEnd
public $doc_url

$id_field public_oe property

public $id_field

$model_class public_oe property

public $model_class

$user public_oe property

public $user

$user_id_field public_oe property

public $user_id_field