Download the PHP package fyre/orm without Composer

On this page you can find all versions of the php package fyre/orm. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package orm

FyreORM

FyreORM is a free, open-source database ORM for PHP.

Table Of Contents

Installation

Using Composer

In PHP:

Methods

Add Namespace

Add a namespace for loading models.

Clear

Clear all namespaces and models.

Create Default Model

Create a default Model.

Get Default Model Class

Get the default model class name.

Get Namespaces

Get the namespaces.

Has Namespace

Check if a namespace exists.

Is Loaded

Check if a model is loaded.

Load

Load a Model.

Remove Namespace

Remove a namespace.

Set Default Model Class

Set the default model class name.

Unload

Unload a model.

Use

Load a shared Model instance.

Models

Custom models can be created by extending the \Fyre\ORM\Model class, suffixing the class name with "Model".

To allow autoloading an instance of your model, add the the namespace to the ModelRegistry.

Delete Query

Create a new DeleteQuery.

Get Connection

Get the Connection.

Models use ConnectionManager for database connections, and you can specify the connection to use by setting the connectionKeys property of your models, or using the setConnection method.

If the self::READ key is omitted, it will fallback to the self::WRITE connection for database reads.

Insert Query

Create a new InsertQuery.

Replace Query

Create a new ReplaceQuery.

Select Query

Create a new SelectQuery.

Set Connection

Set the Connection.

Subquery

Create a new subquery SelectQuery.

Update Query

Create a new UpdateQuery.

Update Batch Query

Create a new UpdateBatchQuery.

Schema

Alias Field

Alias a field name.

Get Alias

Get the model alias.

By default, the alias will be the class name or the alias used when loading the model with ModelRegistry.

Get Auto Increment Key

Get the table auto increment column.

Get Display Name

Get the display name.

By default, the display name will be the first column in the schema with the name of either "name", "title" or "label", or you can specify a column using the displayName property in your models.

Get Primary Key

Get the primary key(s).

Get Schema

Get the TableSchema.

Get Table

Get the table name.

By default, the table name will be the snake case form of the model alias, or you can specify a table name using the table property in your models.

Set Alias

Set the model alias.

Set Display Name

Set the display name.

Set Table

Set the table name.

Entities

Get Entity Class

Get the entity class.

Models will use the EntityLocator to find an entity using the model alias, or you can specify a class using the entityClass property in your models.

Load Into

Load contained data into entity.

New Empty Entity

Build a new empty Entity.

New Entity

Build a new Entity using data.

New Entities

Build multiple new entities using user data.

Patch Entity

Update an Entity using user data.

Patch Entities

Update multiple entities using user data.

Query Methods

Delete

Delete an Entity.

Delete All

Delete all rows matching conditions.

This method will not use callbacks or cascade to related data.

Delete Many

Delete multiple entities.

Exists

Determine if matching rows exist.

Find

Create a new SelectQuery.

Get

Retrieve a single entity.

Save

Save an Entity.

Save Many

Save multiple entities.

Update All

Update all rows matching conditions.

This method will not use callbacks.

Relationship Methods

Add Relationship

Add a Relationship.

Get Relationship

Get a Relationship.

Get Relationships

Get all relationships.

Has Relationship

Determine if a Relationship exists.

Remove Relationship

Remove an existing Relationship.

Behavior Methods

Add Behavior

Add a Behavior to the Model.

Get Behavior

Get a loaded Behavior.

Has Behavior

Determine if the Model has a Behavior.

Remove Behavior

Remove a Behavior from the Model.

Validation

Get Rules

Get the model RuleSet.

You can build custom rules by specifying a buildRules callback in your models.

Get Validator

Get the model Validator.

You can build a custom validator by specifying a buildValidation callback in your models.

Set Rules

Set the model RuleSet.

Set Validator

Set the model Validator.

Callbacks

Callbacks can be defined in your models, allowing custom code to run or revert changes at various points during model operations.

After Delete

Execute a callback after entities are deleted.

If this method returns false the delete will not be performed and the transaction will be rolled back.

After Delete Commit

Execute a callback after entities are deleted and transaction is committed.

After Find

Execute a callback after performing a find query.

After Rules

Execute a callback after model rules are processed.

If this method returns false the save will not be performed.

After Parse

Execute a callback after parsing user data into an entity.

After Save

Execute a callback after entities are saved to the database.

If this method returns false the save will not be performed and the transaction will be rolled back.

After Save Commit

Execute a callback after entities are saved to the database and transaction is committed.

Before Delete

Execute a callback before entities are deleted.

If this method returns false the delete will not be performed.

Before Find

Execute a callback before performing a find query.

Before Parse

Execute a callback before parsing user data into an entity.

Before Rules

Before rules callback.

If this method returns false the save will not be performed.

Before Save

Execute a callback before entities are saved to the database.

If this method returns false the save will not be performed and the transaction will be rolled back.

Build Rules

Build Validation

Queries

Get Model

Get the Model.

Delete

The \Fyre\ORM\Queries\DeleteQuery class extends the DeleteQuery class. The table and alias will be automatically set from the Model.

Insert

The \Fyre\ORM\Queries\InsertQuery class extends the InsertQuery class. The table will be automatically set from the Model.

Replace

The \Fyre\ORM\Queries\ReplaceQuery class extends the ReplaceQuery class. The table will be automatically set from the Model.

Select

The \Fyre\ORM\Queries\SelectQuery class extends the SelectQuery class, while providing several additional methods and wrappers for relationship and entity mapping. The table and alias will be automatically set from the Model, and field names will be automatically aliased.

All

Get the Result.

Clear Result

Clear the buffered result.

Contain

Set the contain relationships.

Count

Get the result count.

Disable Auto Fields

Disable auto fields.

Disable Buffering

Disable result buffering.

Enable Auto Fields

Enable auto fields.

Enable Buffering

Enable result buffering.

First

Get the first result.

Get Alias

Get the alias.

Get Connection Type

Get the connection type.

Get Contain

Get the contain array.

Get Matching

Get the matching array.

Get Result

Get the Result.

Inner Join With

INNER JOIN a relationship table.

Left Join With

LEFT JOIN a relationship table.

Matching

INNER JOIN a relationship table and load matching data.

The matching data will be accessible via the _matchingData property.

Not Matching

LEFT JOIN a relationship table and exclude matching rows.

To Array

Get the results as an array.

Update

The \Fyre\ORM\Queries\UpdateQuery class extends the UpdateQuery class. The table will be automatically set from the Model.

Get Alias

Get the alias.

Update Batch

The \Fyre\ORM\Queries\UpdateBatchQuery class extends the UpdateBatchQuery class. The table and alias will be automatically set from the Model, and field names will be automatically aliased.

Get Alias

Get the alias.

Results

The \Fyre\ORM\Result class wraps the ResultSet class, and acts as a proxy for the Collection class, providing additional handling for entity mapping and eager loading contained results.

Relationships

Belongs To

Has Many

Has One

Many To Many

When loading results, the join table data will be accessible via the _joinData property.

Behavior Registry

Add Namespace

Add a namespace for automatically loading behaviors.

Clear

Clear all namespaces and behaviors.

Find

Find a behavior class.

Get Namespaces

Get the namespaces.

Has Namespace

Check if a namespace exists.

Load

Load a behavior.

Remove Namespace

Remove a namespace.

Behaviors

Behaviors must be attached to a Model using the class name as a property of $this.

Custom behaviors can be created by extending \Fyre\ORM\Behavior, suffixing the class name with "Behavior", and ensuring the __construct method accepts Model as the argument (and optionally an $options array as the second parameter).

Behaviors can also include callbacks that will be executed during model operations.

Get Config

Get the configuration options.

Get Model

Get the Model.

Timestamp

The timestamp behavior provided a simple way to automatically update created/modified timestamps when saving data via models.

Rules

Add

Add a rule.

Exists In

Create an "exists in" rule.

Is Clean

Create an "is clean" rule.

Is Unique

Create an "is unique" rule.

Validate

Validate an Entity.


All versions of orm with dependencies

PHP Build Version
Package Version
Requires fyre/collection Version ^1.0
fyre/container Version ^1.0
fyre/db Version 6.0
fyre/entity Version ^5.0
fyre/inflector Version ^3.0
fyre/lang Version ^4.0
fyre/schema Version ^6.0
fyre/validation Version ^5.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package fyre/orm contains the following files

Loading the files please wait ....