Nextcloud PHP API (master)

IOCMProvider extends JsonSerializable

Model based on the Open Cloud Mesh Discovery API

Tags
link
https://github.com/cs3org/OCM-API/
since
28.0.0

Table of Contents

Methods

addResourceType()  : $this
add a single resource to the object
createNewResourceType()  : IOCMResource
create a new resource to later add it with {@see addResourceType()}
extractProtocolEntry()  : string
extract a specific string value from the listing of protocols, based on resource-name and protocol-name
getApiVersion()  : string
returns API version
getEndPoint()  : string
get configured endpoint
getResourceTypes()  : array<string|int, IOCMResource>
get all set resources
import()  : $this
import data from an array
isEnabled()  : bool
is set as enabled ?
jsonSerialize()  : array{enabled: bool, apiVersion: string, endPoint: string, resourceTypes: array{name: string, shareTypes: string[], protocols: array}[]}
setApiVersion()  : $this
get set API Version
setEnabled()  : $this
enable OCM
setEndPoint()  : $this
configure endpoint
setResourceTypes()  : $this
set resources

Methods

addResourceType()

add a single resource to the object

public addResourceType(IOCMResource $resource) : $this
Parameters
$resource : IOCMResource
Tags
since
28.0.0
Return values
$this

createNewResourceType()

create a new resource to later add it with {@see addResourceType()}

public createNewResourceType() : IOCMResource
Tags
since
28.0.0
Return values
IOCMResource

extractProtocolEntry()

extract a specific string value from the listing of protocols, based on resource-name and protocol-name

public extractProtocolEntry(string $resourceName, string $protocol) : string
Parameters
$resourceName : string
$protocol : string
Tags
throws
OCMArgumentException
since
28.0.0
Return values
string

getApiVersion()

returns API version

public getApiVersion() : string
Tags
since
28.0.0
Return values
string

getEndPoint()

get configured endpoint

public getEndPoint() : string
Tags
since
28.0.0
Return values
string

import()

import data from an array

public import(array<string, int|string|bool|array<string|int, mixed>> $data) : $this
Parameters
$data : array<string, int|string|bool|array<string|int, mixed>>
Tags
throws
OCMProviderException

in case a descent provider cannot be generated from data

since
28.0.0
Return values
$this

isEnabled()

is set as enabled ?

public isEnabled() : bool
Tags
since
28.0.0
Return values
bool

jsonSerialize()

public jsonSerialize() : array{enabled: bool, apiVersion: string, endPoint: string, resourceTypes: array{name: string, shareTypes: string[], protocols: array}[]}
Tags
since
28.0.0
Return values
array{enabled: bool, apiVersion: string, endPoint: string, resourceTypes: array{name: string, shareTypes: string[], protocols: array}[]}

setApiVersion()

get set API Version

public setApiVersion(string $apiVersion) : $this
Parameters
$apiVersion : string
Tags
since
28.0.0
Return values
$this

setEnabled()

enable OCM

public setEnabled(bool $enabled) : $this
Parameters
$enabled : bool
Tags
since
28.0.0
Return values
$this

setEndPoint()

configure endpoint

public setEndPoint(string $endPoint) : $this
Parameters
$endPoint : string
Tags
since
28.0.0
Return values
$this

setResourceTypes()

set resources

public setResourceTypes(array<string|int, IOCMResource$resourceTypes) : $this
Parameters
$resourceTypes : array<string|int, IOCMResource>
Tags
since
28.0.0
Return values
$this

        
On this page

Search results