phpolar / phpolar
一个极简的PHP框架
5.0.0
2023-09-04 14:53 UTC
Requires
- php: >=8.1
- ext-mbstring: *
- laminas/laminas-httphandlerrunner: ^2.9
- php-contrib/authenticator: ^1.0
- php-contrib/response-filter: ^1.0
- php-contrib/validator: ^1.0
- phpolar/core: ^3.0
- phpolar/model-resolver: ^1.0
- phpolar/property-injector-contract: ^1.0
- phpolar/routable: ^2.0
- phpolar/routable-factory: ^1.0
- phpolar/storage-driver: ^1.0
- psr/container: ^2.0
- psr/http-message: ^2.0
- psr/http-server-handler: ^1.0
- psr/http-server-middleware: ^1.0
Requires (Dev)
- ext-ast: *
- ext-openssl: *
- phan/phan: ^5.3
- php-coveralls/php-coveralls: ^2.5
- phpmd/phpmd: ^2.13
- phpolar/csrf-protection: ^3.1
- phpolar/http-message-test-utils: ^0.1.0 || ^0.2.0
- phpolar/model: ^1.2
- phpolar/pure-php: ^2.0
- phpstan/phpstan: ^1.8
- phpunit/phpunit: dev-main
- picocss/pico: 2.0.0alpha1
- squizlabs/php_codesniffer: ^3.7
README
Polar
一个极简的PHP框架
快速开始
# create an example application composer create-project phpolar/skeleton <target-directory>
目标
注意 更多详情请参阅 验收测试结果
纯PHP模板
示例 1
<!DOCTYPE html> <?php /** * @var Page $view */ $view = $this; ?> <html> // ... <body style="text-align:center"> <h1><?= $view->title ?></h1> <div class="container"> </div> </body> </html>
使用属性配置模型
use Phpolar\Phpolar\AbstractModel; class Person extends AbstractModel { #[MaxLength(20)] public string $firstName; #[MaxLength(20)] public string $lastName; #[Column("Residential Address")] #[Label("Residential Address")] #[MaxLength(200)] public string $address1; #[Column("Business Address")] #[Label("Business Address")] #[MaxLength(200)] public string $address2; }
阈值
- 注意:不包括注释。