Download the PHP package windwalker/datamapper without Composer

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

Windwalker DataMapper

Installation via Composer

Add this to the require block in your composer.json.

Getting Started

Prepare Windwalker Database object

The DatabaseDriver will be cached in Factory, now DataMapper will auto load database driver.

See Database

Create DataMapper

Inject DB to DataMapper

Custom primary keys:

Extend It

You can also create a class to operate specific table:

Or using facade:

Find Records

Find method will fetch rows from table, and return DataSet class.

find()

Get id = 1 record

Fetch published = 1, and sort by date

Fetch published = 1, language = en-US, sort by date DESC and start with 30, limit 10.

Using array, will be IN condition:

findOne()

Just return one row.

findAll()

Equal to find(array(), $order, $start, $limit).

Find With Custom Query

The available query methods.

See Query Format

Create Records

Using DataSet to wrap every data, then send this object to create() method, these data will insert to table.

create()

The return value will be whole dataset and add inserted ids.

createOne()

Only insert one row, do not need DataSet.

Update Records

Update methods help us update rows in table.

update()

updateOne()

Just update one row.

updateAll()

UpdateAll is different from update method, we just send one data object, but using conditions as where to update every row match these conditions. We don't need primary key for updateAll().

Delete

Delete rows by conditions.

delete()

Join Tables

Use newRelation() to create a DataMapper and join other tables.

The Join query will be:

Where condition will auto add alias if not provided.

Reset all tables and query:

Using OR Condition

Group

Compare objects

Using Compare objects help us set some where conditions which hard to use array to defind.

This will generate where conditions like below:

Available compares:

Name Description Operator
EqCompare Equal =
NeqCompare Not Equal !=
GtCompare Greater than >
GteCompare Greater than or Equal >=
LtCompare Less than <
LteCompare Less than or Equal <=
InCompare In IN
NinCompare Not In IN

Custom Compare

Will be

See: https://github.com/ventoviro/windwalker-compare

Using Data and DataSet

See: https://github.com/ventoviro/windwalker-data

Hooks

Add "windwalker/event": "~3.0" to composer.json.

Then we are able to use hooks after every operations.

Extends DataMapper:

Available events:

More about Event: Windwalker Event


All versions of datamapper with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.3
windwalker/database Version ~3.0
windwalker/data Version ~3.0
ext-json Version *
ext-pdo 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 windwalker/datamapper contains the following files

Loading the files please wait ....