Download the PHP package egorov/mapper without Composer

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

Tarantool Mapper

License Build Status Latest Version Total Downloads Scrutinizer Code Quality Code Coverage

Installation

The recommended way to install the library is through Composer:

Instantiate mapper

Usually, you manage dependencies in your service provider. To get started you should instantiate connection, packer, client and mapper itself. In this example we use PurePacker and StreamConnection. It means you don't need any pecl extensions. To see other implementations please check client documentation

Logging

By default, client does not logs tarantool requests, you can use mapper\client that supports logging.

Existing types

You can start with your current configuration. Please, note - all instances are mapped to key-value objects.

Describe entities

To get started you should describe your types and fields using meta object.

Use migrations

Use fluent api

Working with the data

Now you can store and retreive data from tarantool storage using mapper instance.

Indexes

Array properties

You can store arrays as property without any serialization to string.

Sequence plugin

If you want you can use sequence plugin that generates next value based on sequence space. Or you can implement id generator using any other source, for example with raft protocol.

User-defined classes plugin

If you want you can specify classes to use for repository and entity instances. Entity and repository class implementation are ommited, but you should just extend base classes.

Annotation plugin

You can describe your entities using dobclock. Mapper will create space, format and indexes for you.

If you want to index fields, extend repository and define indexes property

Register plugin and all your classes:

Internals

Mapper uses IdentityMap and query caching

Performance

Mapper overhead depends on amount of rows and operation type. Table contains overhead in milliseconds per entity. In some cases, overhead can't be calculated due float precision.

Operation 100 1000 10 000 100 000
create entity one by one 0.017 0.022 0.023 0.024
select entity one by one - 0.015 0.016 0.018
one select for all entites - - 0.002 0.006

Perfomance test was made on (intel i5-6400), bash for windows 10 using php 7.0.18. For example, when single select will produce 10 000 entites, you will get 20ms overhead.


All versions of mapper with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0
tarantool/client Version ^0.4.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 egorov/mapper contains the following files

Loading the files please wait ....