Skip to content

panlatent/craft-annotations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Annotations for CraftCMS and Yii Framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages