@@ -33,94 +33,94 @@ |
||
| 33 | 33 | * @since 16.0.0 |
| 34 | 34 | */ |
| 35 | 35 | interface IManager extends IProvider { |
| 36 | - /** |
|
| 37 | - * @param int $id |
|
| 38 | - * @return ICollection |
|
| 39 | - * @throws CollectionException when the collection could not be found |
|
| 40 | - * @since 16.0.0 |
|
| 41 | - */ |
|
| 42 | - public function getCollection(int $id): ICollection; |
|
| 36 | + /** |
|
| 37 | + * @param int $id |
|
| 38 | + * @return ICollection |
|
| 39 | + * @throws CollectionException when the collection could not be found |
|
| 40 | + * @since 16.0.0 |
|
| 41 | + */ |
|
| 42 | + public function getCollection(int $id): ICollection; |
|
| 43 | 43 | |
| 44 | - /** |
|
| 45 | - * @param int $id |
|
| 46 | - * @param IUser|null $user |
|
| 47 | - * @return ICollection |
|
| 48 | - * @throws CollectionException when the collection could not be found |
|
| 49 | - * @since 16.0.0 |
|
| 50 | - */ |
|
| 51 | - public function getCollectionForUser(int $id, ?IUser $user): ICollection; |
|
| 44 | + /** |
|
| 45 | + * @param int $id |
|
| 46 | + * @param IUser|null $user |
|
| 47 | + * @return ICollection |
|
| 48 | + * @throws CollectionException when the collection could not be found |
|
| 49 | + * @since 16.0.0 |
|
| 50 | + */ |
|
| 51 | + public function getCollectionForUser(int $id, ?IUser $user): ICollection; |
|
| 52 | 52 | |
| 53 | - /** |
|
| 54 | - * @param string $name |
|
| 55 | - * @return ICollection |
|
| 56 | - * @since 16.0.0 |
|
| 57 | - */ |
|
| 58 | - public function newCollection(string $name): ICollection; |
|
| 53 | + /** |
|
| 54 | + * @param string $name |
|
| 55 | + * @return ICollection |
|
| 56 | + * @since 16.0.0 |
|
| 57 | + */ |
|
| 58 | + public function newCollection(string $name): ICollection; |
|
| 59 | 59 | |
| 60 | - /** |
|
| 61 | - * Can a user/guest access the collection |
|
| 62 | - * |
|
| 63 | - * @param ICollection $collection |
|
| 64 | - * @param IUser|null $user |
|
| 65 | - * @return bool |
|
| 66 | - * @since 16.0.0 |
|
| 67 | - */ |
|
| 68 | - public function canAccessCollection(ICollection $collection, ?IUser $user): bool; |
|
| 60 | + /** |
|
| 61 | + * Can a user/guest access the collection |
|
| 62 | + * |
|
| 63 | + * @param ICollection $collection |
|
| 64 | + * @param IUser|null $user |
|
| 65 | + * @return bool |
|
| 66 | + * @since 16.0.0 |
|
| 67 | + */ |
|
| 68 | + public function canAccessCollection(ICollection $collection, ?IUser $user): bool; |
|
| 69 | 69 | |
| 70 | - /** |
|
| 71 | - * @param IUser|null $user |
|
| 72 | - * @since 16.0.0 |
|
| 73 | - */ |
|
| 74 | - public function invalidateAccessCacheForUser(?IUser $user): void; |
|
| 70 | + /** |
|
| 71 | + * @param IUser|null $user |
|
| 72 | + * @since 16.0.0 |
|
| 73 | + */ |
|
| 74 | + public function invalidateAccessCacheForUser(?IUser $user): void; |
|
| 75 | 75 | |
| 76 | - /** |
|
| 77 | - * @param IResource $resource |
|
| 78 | - * @since 16.0.0 |
|
| 79 | - */ |
|
| 80 | - public function invalidateAccessCacheForResource(IResource $resource): void; |
|
| 76 | + /** |
|
| 77 | + * @param IResource $resource |
|
| 78 | + * @since 16.0.0 |
|
| 79 | + */ |
|
| 80 | + public function invalidateAccessCacheForResource(IResource $resource): void; |
|
| 81 | 81 | |
| 82 | - /** |
|
| 83 | - * @param IResource $resource |
|
| 84 | - * @param IUser|null $user |
|
| 85 | - * @since 16.0.0 |
|
| 86 | - */ |
|
| 87 | - public function invalidateAccessCacheForResourceByUser(IResource $resource, ?IUser $user): void; |
|
| 82 | + /** |
|
| 83 | + * @param IResource $resource |
|
| 84 | + * @param IUser|null $user |
|
| 85 | + * @since 16.0.0 |
|
| 86 | + */ |
|
| 87 | + public function invalidateAccessCacheForResourceByUser(IResource $resource, ?IUser $user): void; |
|
| 88 | 88 | |
| 89 | - /** |
|
| 90 | - * @param IProvider $provider |
|
| 91 | - * @since 16.0.0 |
|
| 92 | - */ |
|
| 93 | - public function invalidateAccessCacheForProvider(IProvider $provider): void; |
|
| 89 | + /** |
|
| 90 | + * @param IProvider $provider |
|
| 91 | + * @since 16.0.0 |
|
| 92 | + */ |
|
| 93 | + public function invalidateAccessCacheForProvider(IProvider $provider): void; |
|
| 94 | 94 | |
| 95 | - /** |
|
| 96 | - * @param IProvider $provider |
|
| 97 | - * @param IUser|null $user |
|
| 98 | - * @since 16.0.0 |
|
| 99 | - */ |
|
| 100 | - public function invalidateAccessCacheForProviderByUser(IProvider $provider, ?IUser $user): void; |
|
| 95 | + /** |
|
| 96 | + * @param IProvider $provider |
|
| 97 | + * @param IUser|null $user |
|
| 98 | + * @since 16.0.0 |
|
| 99 | + */ |
|
| 100 | + public function invalidateAccessCacheForProviderByUser(IProvider $provider, ?IUser $user): void; |
|
| 101 | 101 | |
| 102 | - /** |
|
| 103 | - * @param string $type |
|
| 104 | - * @param string $id |
|
| 105 | - * @return IResource |
|
| 106 | - * @since 16.0.0 |
|
| 107 | - */ |
|
| 108 | - public function createResource(string $type, string $id): IResource; |
|
| 102 | + /** |
|
| 103 | + * @param string $type |
|
| 104 | + * @param string $id |
|
| 105 | + * @return IResource |
|
| 106 | + * @since 16.0.0 |
|
| 107 | + */ |
|
| 108 | + public function createResource(string $type, string $id): IResource; |
|
| 109 | 109 | |
| 110 | - /** |
|
| 111 | - * @param string $type |
|
| 112 | - * @param string $id |
|
| 113 | - * @param IUser|null $user |
|
| 114 | - * @return IResource |
|
| 115 | - * @throws ResourceException |
|
| 116 | - * @since 16.0.0 |
|
| 117 | - */ |
|
| 118 | - public function getResourceForUser(string $type, string $id, ?IUser $user): IResource; |
|
| 110 | + /** |
|
| 111 | + * @param string $type |
|
| 112 | + * @param string $id |
|
| 113 | + * @param IUser|null $user |
|
| 114 | + * @return IResource |
|
| 115 | + * @throws ResourceException |
|
| 116 | + * @since 16.0.0 |
|
| 117 | + */ |
|
| 118 | + public function getResourceForUser(string $type, string $id, ?IUser $user): IResource; |
|
| 119 | 119 | |
| 120 | - /** |
|
| 121 | - * @param string $provider |
|
| 122 | - * @since 16.0.0 |
|
| 123 | - * @deprecated 18.0.0 Use IProviderManager::registerResourceProvider instead |
|
| 124 | - */ |
|
| 125 | - public function registerResourceProvider(string $provider): void; |
|
| 120 | + /** |
|
| 121 | + * @param string $provider |
|
| 122 | + * @since 16.0.0 |
|
| 123 | + * @deprecated 18.0.0 Use IProviderManager::registerResourceProvider instead |
|
| 124 | + */ |
|
| 125 | + public function registerResourceProvider(string $provider): void; |
|
| 126 | 126 | } |
@@ -31,53 +31,53 @@ |
||
| 31 | 31 | * @since 16.0.0 |
| 32 | 32 | */ |
| 33 | 33 | interface ICollection { |
| 34 | - /** |
|
| 35 | - * @return int |
|
| 36 | - * @since 16.0.0 |
|
| 37 | - */ |
|
| 38 | - public function getId(): int; |
|
| 34 | + /** |
|
| 35 | + * @return int |
|
| 36 | + * @since 16.0.0 |
|
| 37 | + */ |
|
| 38 | + public function getId(): int; |
|
| 39 | 39 | |
| 40 | - /** |
|
| 41 | - * @return string |
|
| 42 | - * @since 16.0.0 |
|
| 43 | - */ |
|
| 44 | - public function getName(): string; |
|
| 40 | + /** |
|
| 41 | + * @return string |
|
| 42 | + * @since 16.0.0 |
|
| 43 | + */ |
|
| 44 | + public function getName(): string; |
|
| 45 | 45 | |
| 46 | - /** |
|
| 47 | - * @param string $name |
|
| 48 | - * @since 16.0.0 |
|
| 49 | - */ |
|
| 50 | - public function setName(string $name): void; |
|
| 46 | + /** |
|
| 47 | + * @param string $name |
|
| 48 | + * @since 16.0.0 |
|
| 49 | + */ |
|
| 50 | + public function setName(string $name): void; |
|
| 51 | 51 | |
| 52 | - /** |
|
| 53 | - * @return IResource[] |
|
| 54 | - * @since 16.0.0 |
|
| 55 | - */ |
|
| 56 | - public function getResources(): array; |
|
| 52 | + /** |
|
| 53 | + * @return IResource[] |
|
| 54 | + * @since 16.0.0 |
|
| 55 | + */ |
|
| 56 | + public function getResources(): array; |
|
| 57 | 57 | |
| 58 | - /** |
|
| 59 | - * Adds a resource to a collection |
|
| 60 | - * |
|
| 61 | - * @param IResource $resource |
|
| 62 | - * @throws ResourceException when the resource is already part of the collection |
|
| 63 | - * @since 16.0.0 |
|
| 64 | - */ |
|
| 65 | - public function addResource(IResource $resource): void; |
|
| 58 | + /** |
|
| 59 | + * Adds a resource to a collection |
|
| 60 | + * |
|
| 61 | + * @param IResource $resource |
|
| 62 | + * @throws ResourceException when the resource is already part of the collection |
|
| 63 | + * @since 16.0.0 |
|
| 64 | + */ |
|
| 65 | + public function addResource(IResource $resource): void; |
|
| 66 | 66 | |
| 67 | - /** |
|
| 68 | - * Removes a resource from a collection |
|
| 69 | - * |
|
| 70 | - * @param IResource $resource |
|
| 71 | - * @since 16.0.0 |
|
| 72 | - */ |
|
| 73 | - public function removeResource(IResource $resource): void; |
|
| 67 | + /** |
|
| 68 | + * Removes a resource from a collection |
|
| 69 | + * |
|
| 70 | + * @param IResource $resource |
|
| 71 | + * @since 16.0.0 |
|
| 72 | + */ |
|
| 73 | + public function removeResource(IResource $resource): void; |
|
| 74 | 74 | |
| 75 | - /** |
|
| 76 | - * Can a user/guest access the collection |
|
| 77 | - * |
|
| 78 | - * @param IUser|null $user |
|
| 79 | - * @return bool |
|
| 80 | - * @since 16.0.0 |
|
| 81 | - */ |
|
| 82 | - public function canAccess(?IUser $user): bool; |
|
| 75 | + /** |
|
| 76 | + * Can a user/guest access the collection |
|
| 77 | + * |
|
| 78 | + * @param IUser|null $user |
|
| 79 | + * @return bool |
|
| 80 | + * @since 16.0.0 |
|
| 81 | + */ |
|
| 82 | + public function canAccess(?IUser $user): bool; |
|
| 83 | 83 | } |
@@ -29,15 +29,15 @@ |
||
| 29 | 29 | * @since 18.0.0 |
| 30 | 30 | */ |
| 31 | 31 | interface IProviderManager { |
| 32 | - /** |
|
| 33 | - * @return IProvider[] list of resource providers |
|
| 34 | - * @since 18.0.0 |
|
| 35 | - */ |
|
| 36 | - public function getResourceProviders(): array; |
|
| 32 | + /** |
|
| 33 | + * @return IProvider[] list of resource providers |
|
| 34 | + * @since 18.0.0 |
|
| 35 | + */ |
|
| 36 | + public function getResourceProviders(): array; |
|
| 37 | 37 | |
| 38 | - /** |
|
| 39 | - * @param string $provider provider's class name |
|
| 40 | - * @since 18.0.0 |
|
| 41 | - */ |
|
| 42 | - public function registerResourceProvider(string $provider): void; |
|
| 38 | + /** |
|
| 39 | + * @param string $provider provider's class name |
|
| 40 | + * @since 18.0.0 |
|
| 41 | + */ |
|
| 42 | + public function registerResourceProvider(string $provider): void; |
|
| 43 | 43 | } |
@@ -29,22 +29,22 @@ |
||
| 29 | 29 | * @since 21.0.0 |
| 30 | 30 | */ |
| 31 | 31 | abstract class InitialStateProvider implements \JsonSerializable { |
| 32 | - /** |
|
| 33 | - * @since 21.0.0 |
|
| 34 | - */ |
|
| 35 | - abstract public function getKey(): string; |
|
| 32 | + /** |
|
| 33 | + * @since 21.0.0 |
|
| 34 | + */ |
|
| 35 | + abstract public function getKey(): string; |
|
| 36 | 36 | |
| 37 | - /** |
|
| 38 | - * @since 21.0.0 |
|
| 39 | - */ |
|
| 40 | - abstract public function getData(); |
|
| 37 | + /** |
|
| 38 | + * @since 21.0.0 |
|
| 39 | + */ |
|
| 40 | + abstract public function getData(); |
|
| 41 | 41 | |
| 42 | - /** |
|
| 43 | - * @since 21.0.0 |
|
| 44 | - * @return mixed |
|
| 45 | - */ |
|
| 46 | - #[\ReturnTypeWillChange] |
|
| 47 | - final public function jsonSerialize() { |
|
| 48 | - return $this->getData(); |
|
| 49 | - } |
|
| 42 | + /** |
|
| 43 | + * @since 21.0.0 |
|
| 44 | + * @return mixed |
|
| 45 | + */ |
|
| 46 | + #[\ReturnTypeWillChange] |
|
| 47 | + final public function jsonSerialize() { |
|
| 48 | + return $this->getData(); |
|
| 49 | + } |
|
| 50 | 50 | } |
@@ -31,48 +31,48 @@ |
||
| 31 | 31 | * @since 8.1.0 |
| 32 | 32 | */ |
| 33 | 33 | interface IOutput { |
| 34 | - /** |
|
| 35 | - * @param string $out |
|
| 36 | - * @since 8.1.0 |
|
| 37 | - */ |
|
| 38 | - public function setOutput($out); |
|
| 34 | + /** |
|
| 35 | + * @param string $out |
|
| 36 | + * @since 8.1.0 |
|
| 37 | + */ |
|
| 38 | + public function setOutput($out); |
|
| 39 | 39 | |
| 40 | - /** |
|
| 41 | - * @param string|resource $path or file handle |
|
| 42 | - * |
|
| 43 | - * @return bool false if an error occurred |
|
| 44 | - * @since 8.1.0 |
|
| 45 | - */ |
|
| 46 | - public function setReadfile($path); |
|
| 40 | + /** |
|
| 41 | + * @param string|resource $path or file handle |
|
| 42 | + * |
|
| 43 | + * @return bool false if an error occurred |
|
| 44 | + * @since 8.1.0 |
|
| 45 | + */ |
|
| 46 | + public function setReadfile($path); |
|
| 47 | 47 | |
| 48 | - /** |
|
| 49 | - * @param string $header |
|
| 50 | - * @since 8.1.0 |
|
| 51 | - */ |
|
| 52 | - public function setHeader($header); |
|
| 48 | + /** |
|
| 49 | + * @param string $header |
|
| 50 | + * @since 8.1.0 |
|
| 51 | + */ |
|
| 52 | + public function setHeader($header); |
|
| 53 | 53 | |
| 54 | - /** |
|
| 55 | - * @return int returns the current http response code |
|
| 56 | - * @since 8.1.0 |
|
| 57 | - */ |
|
| 58 | - public function getHttpResponseCode(); |
|
| 54 | + /** |
|
| 55 | + * @return int returns the current http response code |
|
| 56 | + * @since 8.1.0 |
|
| 57 | + */ |
|
| 58 | + public function getHttpResponseCode(); |
|
| 59 | 59 | |
| 60 | - /** |
|
| 61 | - * @param int $code sets the http status code |
|
| 62 | - * @since 8.1.0 |
|
| 63 | - */ |
|
| 64 | - public function setHttpResponseCode($code); |
|
| 60 | + /** |
|
| 61 | + * @param int $code sets the http status code |
|
| 62 | + * @since 8.1.0 |
|
| 63 | + */ |
|
| 64 | + public function setHttpResponseCode($code); |
|
| 65 | 65 | |
| 66 | - /** |
|
| 67 | - * @param string $name |
|
| 68 | - * @param string $value |
|
| 69 | - * @param int $expire |
|
| 70 | - * @param string $path |
|
| 71 | - * @param string $domain |
|
| 72 | - * @param bool $secure |
|
| 73 | - * @param bool $httpOnly |
|
| 74 | - * @param string $sameSite (added in 20) |
|
| 75 | - * @since 8.1.0 |
|
| 76 | - */ |
|
| 77 | - public function setCookie($name, $value, $expire, $path, $domain, $secure, $httpOnly, $sameSite = 'Lax'); |
|
| 66 | + /** |
|
| 67 | + * @param string $name |
|
| 68 | + * @param string $value |
|
| 69 | + * @param int $expire |
|
| 70 | + * @param string $path |
|
| 71 | + * @param string $domain |
|
| 72 | + * @param bool $secure |
|
| 73 | + * @param bool $httpOnly |
|
| 74 | + * @param string $sameSite (added in 20) |
|
| 75 | + * @since 8.1.0 |
|
| 76 | + */ |
|
| 77 | + public function setCookie($name, $value, $expire, $path, $domain, $secure, $httpOnly, $sameSite = 'Lax'); |
|
| 78 | 78 | } |
@@ -30,11 +30,11 @@ |
||
| 30 | 30 | * @since 8.1.0 |
| 31 | 31 | */ |
| 32 | 32 | interface ICallbackResponse { |
| 33 | - /** |
|
| 34 | - * Outputs the content that should be printed |
|
| 35 | - * |
|
| 36 | - * @param IOutput $output a small wrapper that handles output |
|
| 37 | - * @since 8.1.0 |
|
| 38 | - */ |
|
| 39 | - public function callback(IOutput $output); |
|
| 33 | + /** |
|
| 34 | + * Outputs the content that should be printed |
|
| 35 | + * |
|
| 36 | + * @param IOutput $output a small wrapper that handles output |
|
| 37 | + * @since 8.1.0 |
|
| 38 | + */ |
|
| 39 | + public function callback(IOutput $output); |
|
| 40 | 40 | } |
@@ -42,10 +42,10 @@ |
||
| 42 | 42 | * @deprecated 17.0.0 |
| 43 | 43 | */ |
| 44 | 44 | class StrictInlineContentSecurityPolicy extends ContentSecurityPolicy { |
| 45 | - /** |
|
| 46 | - * @since 14.0.0 |
|
| 47 | - */ |
|
| 48 | - public function __construct() { |
|
| 49 | - $this->inlineStyleAllowed = false; |
|
| 50 | - } |
|
| 45 | + /** |
|
| 46 | + * @since 14.0.0 |
|
| 47 | + */ |
|
| 48 | + public function __construct() { |
|
| 49 | + $this->inlineStyleAllowed = false; |
|
| 50 | + } |
|
| 51 | 51 | } |
@@ -42,10 +42,10 @@ |
||
| 42 | 42 | * @deprecated 17.0.0 |
| 43 | 43 | */ |
| 44 | 44 | class StrictEvalContentSecurityPolicy extends ContentSecurityPolicy { |
| 45 | - /** |
|
| 46 | - * @since 14.0.0 |
|
| 47 | - */ |
|
| 48 | - public function __construct() { |
|
| 49 | - $this->evalScriptAllowed = false; |
|
| 50 | - } |
|
| 45 | + /** |
|
| 46 | + * @since 14.0.0 |
|
| 47 | + */ |
|
| 48 | + public function __construct() { |
|
| 49 | + $this->evalScriptAllowed = false; |
|
| 50 | + } |
|
| 51 | 51 | } |
@@ -35,43 +35,43 @@ |
||
| 35 | 35 | * @since 20.0.0 |
| 36 | 36 | */ |
| 37 | 37 | interface IBootContext { |
| 38 | - /** |
|
| 39 | - * Get hold of the app's container |
|
| 40 | - * |
|
| 41 | - * Useful to register and query app-specific services |
|
| 42 | - * |
|
| 43 | - * @return IAppContainer |
|
| 44 | - * @since 20.0.0 |
|
| 45 | - */ |
|
| 46 | - public function getAppContainer(): IAppContainer; |
|
| 38 | + /** |
|
| 39 | + * Get hold of the app's container |
|
| 40 | + * |
|
| 41 | + * Useful to register and query app-specific services |
|
| 42 | + * |
|
| 43 | + * @return IAppContainer |
|
| 44 | + * @since 20.0.0 |
|
| 45 | + */ |
|
| 46 | + public function getAppContainer(): IAppContainer; |
|
| 47 | 47 | |
| 48 | - /** |
|
| 49 | - * Get hold of the server DI container |
|
| 50 | - * |
|
| 51 | - * Useful to register and query system-wide services |
|
| 52 | - * |
|
| 53 | - * @return IServerContainer |
|
| 54 | - * @since 20.0.0 |
|
| 55 | - */ |
|
| 56 | - public function getServerContainer(): IServerContainer; |
|
| 48 | + /** |
|
| 49 | + * Get hold of the server DI container |
|
| 50 | + * |
|
| 51 | + * Useful to register and query system-wide services |
|
| 52 | + * |
|
| 53 | + * @return IServerContainer |
|
| 54 | + * @since 20.0.0 |
|
| 55 | + */ |
|
| 56 | + public function getServerContainer(): IServerContainer; |
|
| 57 | 57 | |
| 58 | - /** |
|
| 59 | - * Invoke the given callable and inject all parameters based on their types |
|
| 60 | - * and names |
|
| 61 | - * |
|
| 62 | - * Note: when used with methods, make sure they are public or use \Closure::fromCallable |
|
| 63 | - * to wrap the private method call, e.g. |
|
| 64 | - * * `$context->injectFn([$obj, 'publicMethod'])` |
|
| 65 | - * * `$context->injectFn([$this, 'publicMethod'])` |
|
| 66 | - * * `$context->injectFn(\Closure::fromCallable([$this, 'privateMethod']))` |
|
| 67 | - * |
|
| 68 | - * Note: the app container will be queried |
|
| 69 | - * |
|
| 70 | - * @param callable $fn |
|
| 71 | - * @throws ContainerExceptionInterface if at least one of the parameter can't be resolved |
|
| 72 | - * @throws Throwable any error the function invocation might cause |
|
| 73 | - * @return mixed|null the return value of the invoked function, if any |
|
| 74 | - * @since 20.0.0 |
|
| 75 | - */ |
|
| 76 | - public function injectFn(callable $fn); |
|
| 58 | + /** |
|
| 59 | + * Invoke the given callable and inject all parameters based on their types |
|
| 60 | + * and names |
|
| 61 | + * |
|
| 62 | + * Note: when used with methods, make sure they are public or use \Closure::fromCallable |
|
| 63 | + * to wrap the private method call, e.g. |
|
| 64 | + * * `$context->injectFn([$obj, 'publicMethod'])` |
|
| 65 | + * * `$context->injectFn([$this, 'publicMethod'])` |
|
| 66 | + * * `$context->injectFn(\Closure::fromCallable([$this, 'privateMethod']))` |
|
| 67 | + * |
|
| 68 | + * Note: the app container will be queried |
|
| 69 | + * |
|
| 70 | + * @param callable $fn |
|
| 71 | + * @throws ContainerExceptionInterface if at least one of the parameter can't be resolved |
|
| 72 | + * @throws Throwable any error the function invocation might cause |
|
| 73 | + * @return mixed|null the return value of the invoked function, if any |
|
| 74 | + * @since 20.0.0 |
|
| 75 | + */ |
|
| 76 | + public function injectFn(callable $fn); |
|
| 77 | 77 | } |