PHP Class PhalconRest\Api\ApiResource

Inheritance: extends ApiCollection, implements PhalconApi\Acl\MountableInterface, implements Phalcon\Mvc\Micro\CollectionInterface
Afficher le fichier Open project: olivierandriessen/phalcon-rest Class Usage Examples

Protected Properties

Свойство Type Description
$_modelPrimaryKey
$collectionKey
$itemKey
$model
$transformer

Méthodes publiques

Méthode Description
collectionKey ( string $collectionKey ) : static
crud ( string $prefix, string $name = null ) : static Returns resource with default values & all, find, create, update and delete endpoints pre-configured
factory ( string $prefix, string $name = null ) : static Returns resource with default values
getCollectionKey ( ) : string
getItemKey ( ) : string
getModel ( ) : string | null
getModelPrimaryKey ( ) : string | null
getMultipleKey ( ) : string
getSingleKey ( ) : string
getTransformer ( ) : string | null
itemKey ( string $itemKey ) : static
model ( string $model ) : static
multipleKey ( string $multipleKey ) : static
singleKey ( string $singleKey ) : static
transformer ( string $transformer ) : static

Method Details

collectionKey() public méthode

public collectionKey ( string $collectionKey ) : static
$collectionKey string Response key for multiple items
Résultat static

crud() public static méthode

Returns resource with default values & all, find, create, update and delete endpoints pre-configured
public static crud ( string $prefix, string $name = null ) : static
$prefix string Prefix for the resource (e.g. /user)
$name string Name for the resource (e.g. users) (optional)
Résultat static

factory() public static méthode

Returns resource with default values
public static factory ( string $prefix, string $name = null ) : static
$prefix string Prefix for the resource (e.g. /user)
$name string Name for the resource (e.g. users) (optional)
Résultat static

getCollectionKey() public méthode

public getCollectionKey ( ) : string
Résultat string Response key for multiple items

getItemKey() public méthode

public getItemKey ( ) : string
Résultat string Response key for single item

getModel() public méthode

public getModel ( ) : string | null
Résultat string | null Classname of the model

getModelPrimaryKey() public méthode

public getModelPrimaryKey ( ) : string | null
Résultat string | null Primary key of the model

getMultipleKey() public méthode

Deprecation: Use getCollectionKey() instead
public getMultipleKey ( ) : string
Résultat string Response key for multiple items

getSingleKey() public méthode

Deprecation: Use getItemKey() instead
public getSingleKey ( ) : string
Résultat string Response key for single item

getTransformer() public méthode

public getTransformer ( ) : string | null
Résultat string | null Classname of the transformer

itemKey() public méthode

public itemKey ( string $itemKey ) : static
$itemKey string Response key for single item
Résultat static

model() public méthode

public model ( string $model ) : static
$model string Classname of the model
Résultat static

multipleKey() public méthode

Deprecation: Use collectionKey() instead
public multipleKey ( string $multipleKey ) : static
$multipleKey string Response key for multiple items
Résultat static

singleKey() public méthode

Deprecation: Use itemKey() instead
public singleKey ( string $singleKey ) : static
$singleKey string Response key for single item
Résultat static

transformer() public méthode

public transformer ( string $transformer ) : static
$transformer string Classname of the transformer
Résultat static

Property Details

$_modelPrimaryKey protected_oe property

protected $_modelPrimaryKey

$collectionKey protected_oe property

protected $collectionKey

$itemKey protected_oe property

protected $itemKey

$model protected_oe property

protected $model

$transformer protected_oe property

protected $transformer