Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 2.57 KB

README.md

File metadata and controls

44 lines (32 loc) · 2.57 KB

Craft Annotations

Craft Annotations aims to use PHP annotation features to bring a new development experience to CraftCMS and Yii Framework.

Notice: This library is experimental and there will undoubtedly be some performance impact (but probably minimal) from using it, as parsing annotations requires leveraging the reflection API.

Craft Annotations are not intrusive. It uses inheritance to implement functionality. Use it on demand or as a middle layer between your application and Craft/Yii.

Features

  • Controller Access Control

Requirements

  • PHP 8.0.2 or later.

Installation

Then tell Composer to load the library

composer require panlatent/craft-annotations

Usages

Documentation

Attribute Targets Scopes Supports
#[AllowAnonymous] Controller Class Craft Yii
#[RequireLogin] ControllerAction Method Craft
#[RequirePostRequest] ControllerAction Method Craft
#[RequireAcceptsJson] ControllerAction Method Craft

License

The Element Messages is open-sourced software licensed under the MIT license.