Download the PHP package neat/object without Composer

On this page you can find all versions of the php package neat/object. 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 object

Neat Object components

Stable Version Build Status codecov

Neat object component adds a simple yet intuitive ORM layer on top of the Neat database component.

Getting started

To install this package, simply issue composer on the command line:

Then initialize the object manager:

Creating an entity

Entities can be just plain old PHP objects

To persist these entities into the database, we can use a repository:

Find by identifier

If you know the identifier for your entity, you can access it using the has and get methods.

To find and entity from a table using a composed primary key, you should pass the identifiers as an array.

Find using a query

The repository allows you to query for entities in many ways:

Each of these methods can be passed a query in several ways:

Find using static access

To prevent littering your code with manager and repository instances, you can use the Storage trait to allow for static repository access:

Relations

If you need relations just use the Relations trait which supplies factory functions for hasOne/-Many and belongsToOne/-Many relations.

When you have multiple relations to the same class, make sure you assign each of them a unique role using the second parameter to avoid collisions between them:

References

The column names and table names used for each relation have defaults that are determined by the Policy. When these defaults don't work, you can override them by passing a configuration closure as third parameter to the relation method of you choice:

Accessors

Accessor methods allow you to call methods like , , , , , and on your entity object directly:

Translating to is done by the Policy. In its constructor you can provide a pluralize function to allow for proper translations:

Collections

Collections wrap an array of multiple items and offer a chainable way of accessing these items using several operations. Relations to multiple instances of a class (hasMany and belongsToMany) offer the same Collectible API:


All versions of object with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2 || ^8.0
neat/database Version ^1.5
psr/event-dispatcher Version ^1.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 neat/object contains the following files

Loading the files please wait ....