Download the PHP package grithin/record without Composer

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

PHP Record

An arbitrarily deep array that tracks changes, emits events,

Intended to be an observable that matches a database record, allowing the handling of a record like an array, keeping track of changes, handling deep data structures, and allowing listeners to react to change events.

(Similar to SplSubject, but because SplSubject uses pointless SplObserver, SplSubject is not implemented)

Use

Basic

Tracking arbitrarily deep structures

Getter, Setter, And Events

Some additional highlights from the above.

On the after_get function unjsonify, $Record->record['children'] is used to avoid triggering more events. If you don't mind before_change and after_change being run, $Record['children'] could have been used.

When setting the record in the manner $Record['name'] = 'bob', each assignment triggers two events. It may be preferable to do a bulk change, which allows multiple things to change and will only emit two events. This can be done with both the local copy and the source

Overview

Events, Observers

Types:

Convenience functions after_get, before_change, after_change, before_update, after_update will call the parameter function on the corresponding event with parameters ($this, $details), where in $details is an array object of the change.

(EVENT_UPDATE_AFTER runs after EVENT_AFTER_GET since it may require the data to be reformatted by EVENT_AFTER_GET)

Update and Change events will fire only if there were changes.

The diff parameter presented to event observers is an ArrayObject, and that object is used when applying the diff to the record. Consequently, mutating the diff within a "before" event observer will affect the resulting record. If the diff count becomes 0, no change will be applied.

Potential uses of observers:


All versions of record with dependencies

PHP Build Version
Package Version
Requires php Version >=7
ext-pdo Version *
grithin/phpbase 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 grithin/record contains the following files

Loading the files please wait ...