Download the PHP package tobento/service-repository-storage without Composer

On this page you can find all versions of the php package tobento/service-repository-storage. 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 service-repository-storage

Repository Storage Service

Storage repository implementation.

Table of Contents

Getting started

Add the latest version of the repository storage service project running this command.

Requirements

Highlights

Documentation

Check out the Storage Service - Storages for its available storages.

Check out the Repository Service for its documentation.

Storage Repository

To create a storage repository simply extend the :

You may also check out the Repository With Columns section to create the repository using columns.

By default, the read and write methods will return the following types depending on the method called:

You may specify a custom Storage Entity Factory to return custom entities by the parameter.

Storage Read Repository

To create a storage read repository simply extend the :

You may also check out the Repository With Columns section to create the repository using columns.

By default, the find methods will return the following types depending on the method called:

You may specify a custom Storage Entity Factory to return custom entities by the parameter.

findById

You may check out the Storage Service - ItemInterface for its documentation.

findByIds

You may check out the Storage Service - ItemsInterface for its documentation.

You may check out the Storage Service - ItemInterface for its documentation.

findOne

You may check out the Where Parameters for its supported parameters.

You may check out the Storage Service - ItemInterface for its documentation.

findAll

You may check out the Where Parameters for its supported parameters.

You may check out the Storage Service - ItemsInterface for its documentation.

You may check out the Storage Service - ItemInterface for its documentation.

Storage Write Repository

To create a storage write repository simply extend the :

You may also check out the Repository With Columns section to create the repository using columns.

By default, the methods will return the following types depending on the method called:

You may specify a custom Storage Entity Factory to return custom entities by the parameter.

create

You may check out the Storage Service - ItemInterface for its documentation.

updateById

This method will throw a exception if the storage table has no primary key specified or the entity to update does not exist.

You may check out the Storage Service - ItemInterface for its documentation.

update

You may check out the Where Parameters for its supported parameters.

You may check out the Storage Service - ItemsInterface for its documentation.

You may check out the Storage Service - ItemInterface for its documentation.

deleteById

This method will throw a exception if the storage table has no primary key specified or the entity to delete does not exist.

You may check out the Storage Service - ItemInterface for its documentation.

delete

You may check out the Where Parameters for its supported parameters.

You may check out the Storage Service - ItemsInterface for its documentation.

You may check out the Storage Service - ItemInterface for its documentation.

Where Parameters

The following where clauses are supported (for all read/write methods with where parameter):

Or Clauses

To create or clauses add the keyword before any operator:

Storage Entity Factory

You may create a custom entity factory to return custom entities by the Storage Write Repository.

To create a custom entity factory simply extend the and adjust the method:

Repository With Columns

Creating a storage repository with columns has the following advantages:

You may prefer to specify the columns on its class instead by using the method:

Columns Common Methods

Type

The parameters set on the method are used for Migration purpose only.

Check out the Service Database - Column Factory method for more detail.

Check out the Service Database - Index Factory method for more detail.

Read

You may use the read method to specify a reader (callable). The reader will automatically be called by the repository when attempting to retrieve the value.

The value is casted to its column type before being passed to the reader!

Write

You may use the write method to specify a writer (callable). The writer will automatically be called by the repository when attempting to write the value. The writer will only be called if the attribute exists on any write methods. If you you want the writer to be always called, check out the Force Writing section.

The value is casted to its column type before being passed to the writer!

Force Writing

You may use the method to specify if you want to force writing, meaning the writer gets always called even if the attribute was not passed on any write methods.

Storable

Columns

Boolean

Datetime

read

You may use the read method to cast your value. Without specifying a read method, the value will be casted to a string only.

Check out the Dater Service - DateFormatter for more detail.

write

You may use the write method to cast your value. Without specifying a write method, the value will be casted to the following formats:

Check out the Dater Service - DateFormatter for more detail.

autoCreate

Use the method if you want the date to be automatically created if no value was passed by any write methods.

autoUpdate

Use the method if you want the date to be automatically updated if no value was passed by any write methods.

Float

Id

Integer

Json

Text

Translatable

Read Attribute

After reading, a or is being created depending on its column subtype or .

Translations

Confiure the locales for the repository:

Where Parameters Translations

Where clauses for translation columns (for all read/write methods with where parameter):

Write Translations

create

update

Migration

If you have set up your Repository With Columns, you might use the migration and to create your database migration from the columns defined.

First, you will need to install:

Example of migration class

You may check out the Migration Service for more detail.

Credits


All versions of service-repository-storage with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
tobento/service-repository Version ^1.0
tobento/service-storage Version ^1.2.1
tobento/service-iterable Version ^1.0
tobento/service-collection Version ^1.0.5
tobento/service-support Version ^1.0
tobento/service-dater Version ^1.0.1
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 tobento/service-repository-storage contains the following files

Loading the files please wait ....