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:

Basic Usage

Autoloading

It is recommended to bind the ModelRegistry to the Container as a singleton.

Any dependencies will be injected automatically when loading from the Container.

Methods

Add Namespace

Add a namespace for loading models.

Build

Build a Model.

Container.

Clear

Clear all namespaces and models.

Create Default Model

Create a default Model.

Container.

Get Default Model Class

Get the default model class name.

Get Namespaces

Get the namespaces.

Has Namespace

Determine whether a namespace exists.

Is Loaded

Determine whether a model is loaded.

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.

Container.

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 alias.

Get Auto Increment Key

Get the table auto increment column.

Get Class Alias

Get the model class alias.

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

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 Route Key

Get the route key.

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 class alias, or you can specify a table name using the table property in your models.

Set Alias

Set the model alias.

Set Class Alias

Set the model class alias.

Set Display Name

Set the display name.

Set Table

Set the table name.

Entities

Models will use the EntityLocator to find an entity class using the model class alias.

You can map a model alias to a specific entity class using the EntityLocator.

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 whether matching rows exist.

Find

Create a new SelectQuery.

Get

Retrieve a single entity.

Resolve Route Binding

Resolve an entity from a route.

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 whether 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 whether 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 method in your models.

Get Validator

Get the model Validator.

You can build a custom validator by specifying a buildValidation method 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 the $event is stopped, 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 the $event is stopped, 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 the $event is stopped, 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 the $event is stopped, 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 the $event is stopped, the save will not be performed.

Before Save

Execute a callback before entities are saved to the database.

If the $event is stopped, the save will not be performed and the transaction will be rolled back.

Initialize

Initialize the model.

This method is called automatically when the model is loaded. You can define this method on your custom models to attach behaviors.

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

Relationships can be accessed directly as a property on the model, using the relationship name. Target model methods and properties can also be accessed directly from the relationship.

Build Joins

Build join data.

Find Related

Find related data for entities.

Get Binding Key

Get the binding key.

Get Conditions

Get the conditions.

Get Foreign Key

Get the foreign key.

Get Join Type

Get the join type.

Get Name

Get the relationship name.

Get Property

Get the relationship property name.

Get Source

Get the source Model.

Get Strategy

Get the select strategy.

Get Target

Get the target Model.

Has Multiple

Determine whether the relationship has multiple related items.

Is Dependent

Determine whether the target is dependent.

Is Owning Side

Determine whether the source is the owning side of the relationship.

Load Related

Load related data for entities.

Save Related

Save related data for an entity.

Set Binding Key

Set the binding key.

Set Conditions

Set the conditions.

Set Dependent

Set whether the target is dependent.

Set Foreign Key

Set the foreign key.

Set Join Type

Set the join type.

Set Property

Set the property name.

Set Source

Set the source Model.

Set Strategy

Set the select strategy.

Set Target

Set the target Model.

Unlink All

Remove related data from entities.

Belongs To

Has Many

Get Save Strategy

Get the save strategy.

Get Sort

Get the sort order.

Set Save Strategy

Set the save strategy.

Set Sort

Set the sort order.

Has One

Many To Many

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

Get Junction

Get the junction Model.

Get Save Strategy

Get the save strategy.

Get Sort

Get the sort order.

Get Source Relationship

Get the source relationship.

Get Target Foreign Key

Get the target foreign key.

Get Target Relationship

Get the target relationship.

Set Junction

Set the junction Model.

Set Save Strategy

Set the save strategy.

Set Sort

Set the sort order.

Set Target Foreign Key

Set the target foreign key.

Behavior Registry

Autoloading

It is recommended to bind the BehaviorRegistry to the Container as a singleton.

Any dependencies will be injected automatically when loading from the Container.

Behavior Registry Methods

Add Namespace

Add a namespace for automatically loading behaviors.

Build

Build a behavior.

Clear

Clear all namespaces and behaviors.

Find

Find a behavior class.

Get Namespaces

Get the namespaces.

Has Namespace

Determine whether a namespace exists.

Remove Namespace

Remove a namespace.

Behaviors

Behaviors must be attached to a Model using the addBehavior method. Behavior methods can then be called directly on the model.

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.2.0
fyre/entity Version ^6.0
fyre/event Version ^4.1
fyre/inflector Version ^3.0
fyre/lang Version ^5.0
fyre/schema Version ^6.0
fyre/validation Version ^6.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 ....