|
static | build_node_path (string $id, string $name='', string $root='') |
| Generates a safe path to a node.
|
|
static | explode_node_path (string $node) |
| Returns information about a node in a path.
|
|
static | get_browser (rest $service, string $path) |
| Returns the relevant googledocs content browser class based on the given path.
|
|
static | get_node (\stdClass $gdcontent, string $path) |
| Returns the relevant repository content node class based on the Google Drive file's mimetype.
|
|
static | request (rest $service, string $api, array $params) |
| Wrapper function to perform an API call and also catch and handle potential exceptions.
|
|
◆ build_node_path()
static repository_googledocs\helper::build_node_path |
( |
string | $id, |
|
|
string | $name = '', |
|
|
string | $root = '' ) |
|
static |
Generates a safe path to a node.
Typically, a node will be id|name of the node.
- Parameters
-
string | $id | The ID of the node |
string | $name | The name of the node, will be URL encoded |
string | $root | The path to append the node on (must be a result of this function) |
- Return values
-
string | The path to the node |
◆ explode_node_path()
static repository_googledocs\helper::explode_node_path |
( |
string | $node | ) |
|
|
static |
Returns information about a node in a path.
- Parameters
-
string | $node | The node string to extract information from |
- Return values
-
array | The array containing the information about the node |
- See also
- self\build_node_path()
◆ get_browser()
static repository_googledocs\helper::get_browser |
( |
rest | $service, |
|
|
string | $path ) |
|
static |
Returns the relevant googledocs content browser class based on the given path.
- Parameters
-
rest | $service | The rest API object |
string | $path | The current path |
- Return values
-
googledocs_content | The googledocs repository content browser |
◆ get_node()
static repository_googledocs\helper::get_node |
( |
\stdClass | $gdcontent, |
|
|
string | $path ) |
|
static |
Returns the relevant repository content node class based on the Google Drive file's mimetype.
- Parameters
-
stdClass | $gdcontent | The Google Drive content (file/folder) object |
string | $path | The current path |
- Return values
-
node | The content node object |
◆ request()
static repository_googledocs\helper::request |
( |
rest | $service, |
|
|
string | $api, |
|
|
array | $params ) |
|
static |
Wrapper function to perform an API call and also catch and handle potential exceptions.
- Parameters
-
rest | $service | The rest API object |
string | $api | The name of the API call |
array | $params | The parameters required by the API call |
- Return values
-
stdClass | The response object |
- Exceptions
-
The documentation for this class was generated from the following file:
- repository/googledocs/classes/helper.php