Download the PHP package riverside/php-orm without Composer
On this page you can find all versions of the php package riverside/php-orm. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package php-orm
php-orm
PHP micro-ORM and query builder.
Build | GitHub pages | Stable | License |
---|---|---|---|
Requirements
- PHP >= 7.1
- PHP extensions:
- PDO (
ext-pdo
)
- PDO (
Installation
If Composer is not installed on your system yet, you may go ahead and install it using this command line:
Next, add the following require entry to the composer.json
file in the root of your project.
Finally, use Composer to install php-orm and its dependencies:
Configuration
Include autoload in your project:
Configure database credentials by setting up the following environment variables:
USERNAME
, PASSWORD
, DATABASE
, HOST
, PORT
, DRIVER
, CHARSET
, COLLATION
. They must be
prefixed with $connection
property value, part of your model, in capital letters and underscore. The default value of $connection
property is 'default'. For example:
Drivers
The following drivers are supported: mysql
, oci
, firebird
, pgsql
, sqlite
, sybase
, mssql
, dblib
, cubrid
, 4D
.
Database
Table: users
Name | Type | Collation | Attributes | Null | Extra |
---|---|---|---|---|---|
id | int(10) | UNSIGNED | No | AUTO_INCREMENT | |
name | varchar(255) | utf8mb4_general_ci | Yes | ||
varchar(255) | utf8mb4_general_ci | Yes |
Models
Define your own models:
Query Builder
-
with model: create an instance of a model using the
factory
method. Then chain multiple methods. The following is example of simple CRUD: - without model: create a new instance of
Riverside\Orm\DB
class
API
All versions of php-orm with dependencies
ext-pdo Version *