Download the PHP package agorlov/lipid without Composer
On this page you can find all versions of the php package agorlov/lipid. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package lipid
Lipid
Lipid is an objects designed microframework for PHP web apps.
Quickstart
Create app directory:
Lipid is installed, start with example app, run:
3 files will be created:
index.php
- it's your app, it consists of actions-objects for each page or request;src/ActIndex.php
- it's example action for main page;tpl/index.twig
- it's example index page template.
And start your app:
Finaly open browser: http://localhost:8000
Enjoy Result and start creating your app pages.
How to create Actions (pages or api-responses)
ActIndex.php
If we need database or GET params, put it in constructor:
In this example $_GET['test'] -> with $this->GET array
GET request, POST request, Database, Config, Environment, Session:
Design principles
-
True OOP:
- each object is representation of domain term
- no static,
- small objects,
- without extends,
- wide use of decorators,
- strict CI/CD piplene: unit tests, PSR2 checker,
- immutable
- inspired by @yegor256 Elegant Objects
-
Micro-format, like lipid is.
- From
Lipid framework
to Lipid as process (including design principles, rules, ci/cd)
Library development cycle
- Clone repository
$ composer install
$ composer dump-autoload
$ composer example
- open browser: http://localhost:8000/
-
look at the source code: example/ directory.
-
Put some changes, create branch for issue:
-
Check and fix PSR2
$ composer phpcs
and$composer phpcs-fix
-
Check by unit tests:
- commit, push and create PR.
PHPMD
@todo #75 setup and add phpmd to merge checks
To disable some nasty rule, add comment:
- run phpmd:
$ composer phpmd-xml
- look at rule name
- add string
@SuppressWarnings("rule name")
to phpdoc block of method or class