Nextcloud PHP API (stable18)

Result

The generic result of a search

Tags
since
7.0.0

Table of Contents

$id  : string
A unique identifier for the result, usually given as the item ID in its corresponding application.
$link  : string
URL to the application item.
$name  : string
The name of the item returned; this will be displayed in the search results.
$type  : string
The type of search result returned; for consistency, name this the same as the class name (e.g. \OC\Search\File -> 'file') in lowercase.
__construct()  : mixed
Create a new search result

Properties

$id

A unique identifier for the result, usually given as the item ID in its corresponding application.

public string $id
Tags
since
7.0.0

URL to the application item.

public string $link
Tags
since
7.0.0

$name

The name of the item returned; this will be displayed in the search results.

public string $name
Tags
since
7.0.0

$type

The type of search result returned; for consistency, name this the same as the class name (e.g. \OC\Search\File -> 'file') in lowercase.

public string $type = 'generic'
Tags
since
7.0.0

Methods

__construct()

Create a new search result

public __construct([string $id = null ][, string $name = null ][, string $link = null ]) : mixed
Parameters
$id : string = null

unique identifier from application: '[app_name]/[item_identifier_in_app]'

$name : string = null

displayed text of result

$link : string = null

URL to the result within its app

Tags
since
7.0.0
Return values
mixed

Search results