Files
nextcloud-server-mirror/lib/private/AppFramework/Bootstrap/NodeAttributeProviderRegistration.php
John Molakvoæ 9b9757d721 feat: add node attribute providers for WebDAV and PHP
Apps register INodeAttributeProvider with the attributes they serve, in
Clark notation. INodeSerializer returns nodes with those attributes in
the shape @nextcloud/files uses, so PHP code gets the same file data as
a PROPFIND.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
2026-10-16 17:52:43 +02:00

37 lines
736 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OC\AppFramework\Bootstrap;
use NCU\Files\NodeAttributes\INodeAttributeProvider;
/**
* @psalm-immutable
* @template-extends ServiceRegistration<INodeAttributeProvider>
*/
class NodeAttributeProviderRegistration extends ServiceRegistration {
/**
* @param list<string> $attributes in Clark notation
*/
public function __construct(
string $appId,
string $service,
private array $attributes,
) {
parent::__construct($appId, $service);
}
/**
* @return list<string>
*/
public function getAttributes(): array {
return $this->attributes;
}
}