Ocis
in package
Basic class to establish the connection to an ownCloud Infinite Scale instance
Table of Contents
Methods
- __construct() : mixed
- createDrive() : Drive
- Create a new drive (if the user has the permission to do so)
- createEducationUser() : EducationUser
- Create a new education user (if the user has the permission to do so)
- createGroup() : Group
- Create a new group (if the user has the permission to do so)
- deleteGroupByID() : void
- delete an existing group (if the user has the permission to do so)
- getAllDrives() : array<string|int, Drive>
- Get all available drives
- getDriveById() : Drive
- Retrieve a drive by its unique id
- getEducationUserById() : EducationUser
- getEducationUsers() : array<string|int, EducationUser>
- retrieve education users known by the system
- getGroupById() : Group
- getGroups() : array<int, Group>
- Get list of groups (if the user has the permission to do so)
- getMyDrives() : array<string|int, Drive>
- Get all drives that the current user is a regular member of
- getNotifications() : array<string|int, Notification>
- Retrieve all unread notifications of the current user
- getOcisVersion() : string
- returns the current oCIS version in semantic versioning format ( e.g. "5.0.5" )
- getResourceById() : OcisResource
- getServiceUrl() : string
- getSharedByMe() : array<string|int, ShareCreated|ShareLink>
- getSharedWithMe() : array<string|int, ShareReceived>
- getUserById() : User
- getUsers() : array<string|int, User>
- retrieve users known by the system NOTE: if this function is used by a normal user a search string with at least 3 characters should be provided
- isDrivesGetDrivesApi() : bool
- isDrivesRootApi() : bool
- searchResource() : array<string|int, OcisResource>
- Search resource globally or within drive/folder
- setAccessToken() : void
- Update the access token. Call this function after refreshing the access token.
Methods
__construct()
public
__construct(string $serviceUrl[, string|null $accessToken = null ][, array<string|int, mixed> $connectionConfig = [] ][, string|null $educationAccessToken = null ]) : mixed
Parameters
- $serviceUrl : string
- $accessToken : string|null = null
- $connectionConfig : array<string|int, mixed> = []
- $educationAccessToken : string|null = null
Tags
createDrive()
Create a new drive (if the user has the permission to do so)
public
createDrive(string $name[, int $quota = 0 ][, string|null $description = null ]) : Drive
Parameters
- $name : string
- $quota : int = 0
-
in bytes
- $description : string|null = null
Tags
Return values
DrivecreateEducationUser()
Create a new education user (if the user has the permission to do so)
public
createEducationUser(string $displayName, string $onPremisesSAMAccountName, string $issuer, string $issuerAssignedId, string $primaryRole[, string|null $surname = null ][, string|null $givenName = null ][, string|null $mail = null ][, EducationUserApi|null $apiInstance = null ]) : EducationUser
Parameters
- $displayName : string
- $onPremisesSAMAccountName : string
- $issuer : string
- $issuerAssignedId : string
- $primaryRole : string
- $surname : string|null = null
- $givenName : string|null = null
- $mail : string|null = null
- $apiInstance : EducationUserApi|null = null
Return values
EducationUsercreateGroup()
Create a new group (if the user has the permission to do so)
public
createGroup(string $groupName[, string $description = "" ]) : Group
Parameters
- $groupName : string
- $description : string = ""
Tags
Return values
GroupdeleteGroupByID()
delete an existing group (if the user has the permission to do so)
public
deleteGroupByID(string $groupId) : void
Parameters
- $groupId : string
Tags
getAllDrives()
Get all available drives
public
getAllDrives([DriveOrder $orderBy = DriveOrder::NAME ][, OrderDirection $orderDirection = OrderDirection::ASC ][, DriveType|null $type = null ]) : array<string|int, Drive>
Parameters
- $orderBy : DriveOrder = DriveOrder::NAME
- $orderDirection : OrderDirection = OrderDirection::ASC
- $type : DriveType|null = null
Tags
Return values
array<string|int, Drive>getDriveById()
Retrieve a drive by its unique id
public
getDriveById(string $driveId) : Drive
Parameters
- $driveId : string
Tags
Return values
DrivegetEducationUserById()
public
getEducationUserById(string $userId[, EducationUserApi|null $apiInstance = null ]) : EducationUser
Parameters
- $userId : string
- $apiInstance : EducationUserApi|null = null
Tags
Return values
EducationUsergetEducationUsers()
retrieve education users known by the system
public
getEducationUsers([array<string|int, string>|null $search = null ][, EducationUserApi|null $apiInstance = null ]) : array<string|int, EducationUser>
Parameters
- $search : array<string|int, string>|null = null
- $apiInstance : EducationUserApi|null = null
Tags
Return values
array<string|int, EducationUser>getGroupById()
public
getGroupById(string $groupId) : Group
Parameters
- $groupId : string
Tags
Return values
GroupgetGroups()
Get list of groups (if the user has the permission to do so)
public
getGroups([string $search = "" ][, OrderDirection $orderBy = OrderDirection::ASC ][, bool $expandMembers = false ]) : array<int, Group>
Parameters
- $search : string = ""
- $orderBy : OrderDirection = OrderDirection::ASC
- $expandMembers : bool = false
Tags
Return values
array<int, Group>getMyDrives()
Get all drives that the current user is a regular member of
public
getMyDrives([DriveOrder $orderBy = DriveOrder::NAME ][, OrderDirection $orderDirection = OrderDirection::ASC ][, DriveType|null $type = null ]) : array<string|int, Drive>
Parameters
- $orderBy : DriveOrder = DriveOrder::NAME
- $orderDirection : OrderDirection = OrderDirection::ASC
- $type : DriveType|null = null
Tags
Return values
array<string|int, Drive>getNotifications()
Retrieve all unread notifications of the current user
public
getNotifications() : array<string|int, Notification>
Tags
Return values
array<string|int, Notification>getOcisVersion()
returns the current oCIS version in semantic versioning format ( e.g. "5.0.5" )
public
getOcisVersion() : string
Tags
Return values
stringgetResourceById()
public
getResourceById(string $fileId) : OcisResource
Parameters
- $fileId : string
Tags
Return values
OcisResourcegetServiceUrl()
public
getServiceUrl() : string
Return values
stringgetSharedByMe()
public
getSharedByMe() : array<string|int, ShareCreated|ShareLink>
Tags
Return values
array<string|int, ShareCreated|ShareLink>getSharedWithMe()
public
getSharedWithMe() : array<string|int, ShareReceived>
Tags
Return values
array<string|int, ShareReceived>getUserById()
public
getUserById(string $userId) : User
Parameters
- $userId : string
Tags
Return values
UsergetUsers()
retrieve users known by the system NOTE: if this function is used by a normal user a search string with at least 3 characters should be provided
public
getUsers([string|null $search = null ]) : array<string|int, User>
Parameters
- $search : string|null = null
Tags
Return values
array<string|int, User>isDrivesGetDrivesApi()
public
static isDrivesGetDrivesApi(mixed $api) : bool
Parameters
- $api : mixed
Return values
boolisDrivesRootApi()
public
static isDrivesRootApi(mixed $api) : bool
Parameters
- $api : mixed
Return values
boolsearchResource()
Search resource globally or within drive/folder
public
searchResource(string $pattern[, int|null $limit = null ][, string|null $scopeId = null ]) : array<string|int, OcisResource>
Parameters
- $pattern : string
-
The search pattern where it can be of format:
-
mediatype:<pattern>
: Search by media type (e.g.,mediatype:*png*
). -
name:*<pattern>
: Search by resource name (e.g.,name:*der2
). -
<pattern>
: General search pattern (e.g.,fold*
,*der1
,subfolder
,*fo*
). oCIS has huge tests coverage where supported pattern can be found https://github.com/owncloud/ocis
-
- $limit : int|null = null
- $scopeId : string|null = null
-
scopeId could be driveId or folderId
Tags
Return values
array<string|int, OcisResource>setAccessToken()
Update the access token. Call this function after refreshing the access token.
public
setAccessToken(string $accessToken) : void
Parameters
- $accessToken : string