Download the PHP package philippgrashoff/atkdatamodeltraits without Composer

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

atkdatamodeltraits

codecov

A small collection of traits to be used with Atk4\Data\Model.

CreatedDateAndLastUpdatedTrait

This trait can be used to add a created_date and/or a last_updated field to a model. The corresponding hooks are automatically added to save created_date on insert and last_updated on update.

UniqueFieldTrait

This trait provides a function isFieldUnique() to check if the field's current value is unique among all records in persistence. This functionality can also be achieved by adding a UNIQUE index to an SQL persistence. Having this functionality in the application layer can be sensible to be independent of the persistence's features - or to avoid getting back an exception from the persistence if a non-unique value is being tried to save.

CryptIdTrait

This trait is used to generate cryptic IDs like D6f2-a395Jskv2. You can freely define the format the cryptic ID shall have. The functionality can for example be used to create coupon codes or create unguessable, yet human-readable codes/identifiers. The characters I,l,0 and O are removed as they can be easily be mistaken by humans. To use this trait, you just need to add the cryptic ID field in Model::init() using addCryptIdFieldAndHooks and implement a custom method generateCryptId() that returns a random string in the format of your choice:


All versions of atkdatamodeltraits with dependencies

PHP Build Version
Package Version
Requires php Version 8.*
atk4/data Version 5.*
ext-sodium Version *
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 philippgrashoff/atkdatamodeltraits contains the following files

Loading the files please wait ....