Download the PHP package somnambulist/entity-behaviours without Composer

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

Moved to https://github.com/dave-redfern/somnambulist-domain

This repository has been archived. Please update to the combined package.s

Entity Behaviours

Provides some useful interfaces and traits that can be used with entities. The traits implement on basic methods, and still require e.g. publish/unpublish to be implemented.

Requirements

Installation

Install using composer, or checkout / pull the files from github.com.

Behaviours

Unlike the somnambulist/laravel-doctrine-behaviours package, these behaviours are intended to be used in a much more controlled and DDD based system. As such they do not implement setters and in some cases even the methods defined in the interfaces as these are core domain methods that should raise events within your system.

  1. Activatable

    Adds activate()/deactivate() methods to an entity controlling if it is active or not. The entity should implement activate/deactivate methods so that Events can be raised.

  2. GloballyTrackable

    A collection of other interfaces: Identifiable, Nameable, Timestampable, UniversallyIdentifiable.

  3. Identifiable

    Adds an id() method that returns the primary identifier (int, string, object)

  4. IdentifiableWithTimestamps

    A combination of Identifiable and Timestampable

  5. Nameable

    Adds a name() method that returns the entity name component.

  6. NumericallySortable

    Adds an ordinal() and update method for adding a numerical sorting index to an entity.

  7. Publishable

    Adds publish()/unpublish() for controlling if an Entity is "published". Uses the DateTime value object. publish/unpublish are not implemented as they should raise events when used.

  8. Stringable

    Adds __toString() and a toString() method that will use try the following methods:

    • displayAs()
    • title()
    • name()

    If none are present an empty string is returned.

  9. Timestampable

    Adds createdAt()/updatedAt() methods. Not setters are not defined as the entity should update the updatedAt when it is changed through update calls and not rely on database behaviour.

  10. Trackable

    A collection of other interfaces: Identifiable, Nameable, Timestampable

  11. UniversallyIdentifiable

    Adds a uuid() method that returns a Uuid value object.

  12. Versionable

    Adds a version() and incrementVersion() methods for defining the current entity version. incrementVersion should be hooked in appropriate update methods when the entity is modified.

Utilities


All versions of entity-behaviours with dependencies

PHP Build Version
Package Version
Requires php Version >=7
somnambulist/value-objects Version ~1.2
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 somnambulist/entity-behaviours contains the following files

Loading the files please wait ....