Nextcloud PHP API (master)

LinkReferenceProvider
in package
implements IReferenceProvider, IPublicReferenceProvider

Tags
since
29.0.0

Table of Contents

Interfaces

IReferenceProvider
IPublicReferenceProvider

Constants

ALLOWED_CONTENT_TYPES  = ['image/png', 'image/jpg', 'image/jpeg', 'image/gif', 'image/svg+xml', 'image/webp']
MAX_CONTENT_LENGTH  = 5 * 1024 * 1024
for image size and webpage header

Properties

$appDataFactory  : IAppDataFactory
$clientService  : IClientService
$limiter  : Limiter
$logger  : LoggerInterface
$request  : IRequest
$systemConfig  : SystemConfig
$urlGenerator  : IURLGenerator
$userSession  : IUserSession

Methods

__construct()  : mixed
getCacheKey()  : string|null
Return a custom cache key to be used for caching the metadata This could be for example the current user id if the reference access permissions are different for each user
getCacheKeyPublic()  : string|null
Return a custom cache key to be used for caching the metadata This could be for example the current sharingToken if the reference access permissions are different for each share
getCachePrefix()  : string
Return true if the reference metadata can be globally cached
matchReference()  : bool
Validate that a given reference identifier matches the current provider
resolveReference()  : IReference|null
Return a reference with its metadata for a given reference identifier
resolveReferencePublic()  : IReference|null
Return a reference with its metadata for a given reference identifier and sharingToken
fetchReference()  : void
Populates the reference with OpenGraph data

Constants

ALLOWED_CONTENT_TYPES

public mixed ALLOWED_CONTENT_TYPES = ['image/png', 'image/jpg', 'image/jpeg', 'image/gif', 'image/svg+xml', 'image/webp']
Tags
since
29.0.0

MAX_CONTENT_LENGTH

for image size and webpage header

public mixed MAX_CONTENT_LENGTH = 5 * 1024 * 1024
Tags
since
29.0.0

Properties

Methods

__construct()

public __construct(IClientService $clientService, LoggerInterface $logger, SystemConfig $systemConfig, IAppDataFactory $appDataFactory, IURLGenerator $urlGenerator, Limiter $limiter, IUserSession $userSession, IRequest $request) : mixed
Parameters
$clientService : IClientService
$logger : LoggerInterface
$systemConfig : SystemConfig
$appDataFactory : IAppDataFactory
$urlGenerator : IURLGenerator
$limiter : Limiter
$userSession : IUserSession
$request : IRequest
Tags
since
29.0.0

getCacheKey()

Return a custom cache key to be used for caching the metadata This could be for example the current user id if the reference access permissions are different for each user

public getCacheKey(string $referenceId) : string|null
Parameters
$referenceId : string
Tags
inheritDoc
since
29.0.0
Return values
string|null

getCacheKeyPublic()

Return a custom cache key to be used for caching the metadata This could be for example the current sharingToken if the reference access permissions are different for each share

public getCacheKeyPublic(string $referenceId, string $sharingToken) : string|null
Parameters
$referenceId : string
$sharingToken : string
Tags
inheritDoc
since
30.0.0
Return values
string|null

getCachePrefix()

Return true if the reference metadata can be globally cached

public getCachePrefix(string $referenceId) : string
Parameters
$referenceId : string
Tags
inheritDoc
since
29.0.0
Return values
string

matchReference()

Validate that a given reference identifier matches the current provider

public matchReference(string $referenceText) : bool
Parameters
$referenceText : string
Tags
inheritDoc
since
29.0.0
Return values
bool

resolveReference()

Return a reference with its metadata for a given reference identifier

public resolveReference(string $referenceText) : IReference|null
Parameters
$referenceText : string
Tags
inheritDoc
since
29.0.0
Return values
IReference|null

resolveReferencePublic()

Return a reference with its metadata for a given reference identifier and sharingToken

public resolveReferencePublic(string $referenceText, string $sharingToken) : IReference|null
Parameters
$referenceText : string
$sharingToken : string
Tags
inheritDoc
since
30.0.0
Return values
IReference|null

        
On this page

Search results