Skip to content
This repository has been archived by the owner on Dec 30, 2023. It is now read-only.

Latest commit

 

History

History
48 lines (35 loc) · 1.45 KB

datamapper.md

File metadata and controls

48 lines (35 loc) · 1.45 KB
layout title keywords
default
Data Mapper
data mapper, pdo, query builder

Data Mapper


![](/assets/images/version-{{ pageVersion }}.svg)

These components have been heavily influenced by Aura PHP and Atlas PHP

{: .alert .alert-warning }

Введение

The Data Mapper pattern as described by Martin Fowler in Patterns of Enterprise Application Architecture is:

A layer of Mappers that moves data between objects and a database while keeping them independent of each other and the mapper itself.

{: .alert .alert-info }

The Phalcon\DataMapper namespace contains components to help with accessing your data source, with the [Data Mapper][pattern].

PDO

Connection

One of the components required by this implementation is a PDO connector. The Phalcon\DataMapper\Pdo\Connection offers a wrapper to PHP's PDO implementation, making it easier to maintain connections.

Connecting to a source

Connection - Decorated

ConnectionLocator

Profiler

Query

Фабрика

Delete

Insert

Select

Update