phpolar / phpolar
A minimal PHP framework
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
- dev-main
- 5.0.0
- 4.0.0
- 2.0.2
- 1.6.5
- dev-dependabot/composer/phpunit/phpunit-10.5.20
- dev-dependabot/composer/squizlabs/php_codesniffer-3.9.2
- dev-dependabot/composer/phpunit/phpunit-10.5.19
- dev-dependabot/composer/phpstan/phpstan-1.10.67
- dev-dependabot/composer/squizlabs/php_codesniffer-3.9.1
- dev-dependabot/composer/phpmd/phpmd-2.15.0
- dev-dependabot/composer/php-coveralls/php-coveralls-2.7.0
- dev-releases/php7-4
This package is auto-updated.
Last update: 2024-04-25 03:17:23 UTC
README
Polar
A minimal PHP framework
Quick Start
Documentation
API
Website
Quick start
# create an example application composer create-project phpolar/skeleton <target-directory>
Objectives
- Provide attributes so that objects can be declaratively configured for clean application development.
- Support using pure PHP templates with automatic XSS mitigation.
- Keep project small. See thresholds
Note For more details see the acceptance tests results
Pure PHP Templates
Example 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 Attributes to Configure Models
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; }
Thresholds
Module | Source Code Size * | Memory Usage | Required |
---|---|---|---|
phpolar | 9 kB | 200 kB | x |
phpolar/core | 4 kB | x | |
phplar/model | 19 kB | 108 kB | |
TOTAL | 32 kB | 308 kB |
- Note: Does not include comments.