Download the PHP package activecollab/databaseobject without Composer

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

DatabaseObject Library

Build Status

DatabaseObject library is a set of classes that make work with database just a bit easier. Here are the key concepts:

  1. Types - entities that map to a single table,
  2. Entities - type instances that map to a single row of a type table,
  3. Entity Manager - instances that provide access to custom type specific manipulation methods,
  4. Collections - a group of objects that meets the given criteria. This group is perfect for HTTP responses because collections support data tagging and tag validation (ETag and HTTP 304),
  5. Pool - manage registered types and make multi-type interaction possible,
  6. Producers - customise the way pool produces new instances,
  7. Validators - validate object properties before saving them to the database.

CRUD

If you wish to work with entire tables, use CRUD methods provided by ConnectionInterface:

  1. ConnectionInterface::insert() - insert one or more rows
  2. ConnectionInterface::update() - update a set of rows that match the given conditions, if any
  3. ConnectionInterface::delete() - drop a set of rows taht match the given conditions, if any

When you need to work with individual instances, PoolInterface provides following handy methods:

  1. PoolInterface::produce() - create a new record based on the given parameters,
  2. PoolInterface::modify() - change the given object with a set of parameters,
  3. PoolInterface::scrap() - trash or permanently delete the given object.

Scrap

Recently we added ScrapInterface. This interface should be implemented by models which support object trashing, instead of instant deletion. When PoolInterface::scrap() method is called, objects that implement ScrapInterface will be scrapped (marked as deleted or trashed, depending on a particular implementation), instead of being permanently deleted.

Finder

To set conditions, use where method:

This method can be called multiple times, and all conditions will be joined in one block with AND operator:

Finder can join a table, either by table name:

or by related type:

Note that in the second case, WriterGroup type needs to be registered in the pool.

DI Container

Pool implements ActiveCollab\ContainerAccess\ContainerAccessInterface, so you can set any container that implements Interop\Container\ContainerInterface interface, and that container will be passed on and made available in finders, producers and objects:

Generated Fields

Generated fields are fields that exist in tables, but they are not controlled or managed by the entity class itself. Instead, values of these models are set elsewhere:

  1. They are specifief as generated columns in table's definition,
  2. Trigger set the values,
  3. Values are set by external systems or processes.

Library provides access to values of these fields, via accessors methods, but these values can't be set using setter methods:

Value casting can be set during entity configuration:

Entity class also refreshes the values of these fields on object save so fresh values are instantly available in case they are recalculated in the background (by a trigger or generated field expression).

To Do

  1. Caching,
  2. Remove deprecated ObjectInterface and Object class.

All versions of databaseobject with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
activecollab/databaseconnection Version ^5.0
activecollab/etag Version ^2.0
activecollab/object Version ^1.0
doctrine/inflector Version ^2.0
psr/log Version ^1.0.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 activecollab/databaseobject contains the following files

Loading the files please wait ....