mirror of
https://github.com/nextcloud/documentation.git
synced 2026-01-04 02:36:49 +07:00
updated dev docs with new changes to the appframework
This commit is contained in:
@@ -17,11 +17,6 @@ Entity
|
||||
|
||||
|
||||
|
||||
.. php:method:: __construct()
|
||||
|
||||
|
||||
|
||||
|
||||
.. php:method:: resetUpdatedFields()
|
||||
|
||||
|
||||
@@ -72,6 +67,17 @@ Entity
|
||||
|
||||
|
||||
|
||||
.. php:method:: addType($fieldName, $type)
|
||||
|
||||
:param string $fieldName: the name of the attribute
|
||||
:param string $type: the type which will be used to call settype()
|
||||
|
||||
* **Protected**
|
||||
|
||||
|
||||
Adds type information for a field so that its automatically casted tothat value once its being returned from the database
|
||||
|
||||
|
||||
.. php:method:: fromRow($row)
|
||||
|
||||
:param array $row: the row to map onto the entity
|
||||
|
||||
@@ -47,6 +47,7 @@ may be subject to change in the future
|
||||
.. php:method:: update($entity)
|
||||
|
||||
:param \\OCA\\AppFramework\\Db\\Entity $entity:
|
||||
:throws \\InvalidArgumentException: if entity has no id
|
||||
|
||||
|
||||
Updates an entry in the db from an entity
|
||||
|
||||
@@ -11,10 +11,9 @@ Encapsulates $_GET, $_FILES and $_POST arrays for better testability
|
||||
|
||||
|
||||
|
||||
.. php:method:: __construct($get=array(), $post=array(), $files=array(), $server=array(), $env=array(), $session=array(), $cookie=array(), $urlParams=array())
|
||||
.. php:method:: __construct($params=array(), $files=array(), $server=array(), $env=array(), $session=array(), $cookie=array(), $urlParams=array())
|
||||
|
||||
:param array $get: the $_GET array
|
||||
:param array $post: the $_POST array
|
||||
:param array $params: the parsed json array
|
||||
:param array $files: the $_FILES array
|
||||
:param array $server: the $_SERVER array
|
||||
:param array $env: the $_ENV array
|
||||
@@ -32,24 +31,14 @@ Encapsulates $_GET, $_FILES and $_POST arrays for better testability
|
||||
Returns the merged urlParams, GET and POST array
|
||||
|
||||
|
||||
.. php:method:: getGET($key, $default=null)
|
||||
.. php:method:: getParams($key, $default=null)
|
||||
|
||||
:param string $key: the array key that should be looked up
|
||||
:param string $default: if the key is not found, return this value
|
||||
:returns mixed: the value of the stored array or the default
|
||||
|
||||
|
||||
Returns the get value or the default if not found
|
||||
|
||||
|
||||
.. php:method:: getPOST($key, $default=null)
|
||||
|
||||
:param string $key: the array key that should be looked up
|
||||
:param string $default: if the key is not found, return this value
|
||||
:returns mixed: the value of the stored array or the default
|
||||
|
||||
|
||||
Returns the get value or the default if not found
|
||||
Returns the request params value or the default if not found
|
||||
|
||||
|
||||
.. php:method:: getFILES($key)
|
||||
|
||||
@@ -40,3 +40,4 @@ Simple utility class for testing mappers
|
||||
|
||||
Create mocks and set expected results for database queries
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user