atlas/mapper
Composer 安装命令:
composer require atlas/mapper
包简介
A data mapper for the persistence model.
README 文档
README
A data mapper implementation for Atlas. Though it is primarily intended as the heart of Atlas.Orm, it may be used independently of that package.
Getting Started
First, you will need to create the prerequsite data-source classes using Atlas.Cli 2.x.
Once you have done so, create a MapperLocator using the static new() method
and pass your PDO connection parameters:
use Atlas\Table\MapperLocator; $mapperLocator = MapperLocator::new('sqlite::memory:'')
You can then use the locator to retrieve a Mapper by its class name.
use Atlas\Testing\DataSource\Thread\ThreadMapper; $threadMapper = $mapperLocator->get(ThreadMapper::CLASS)
From there you can fetch, insert, update, delete, and persist Record objects.
In the absence of full documentation, please review these Mapper methods instead:
- fetchRecord()
- fetchRecordBy()
- fetchRecords()
- fetchRecordsBy()
- fetchRecordSet()
- fetchRecordSetBy()
- select()
- insert()
- update()
- delete()
- persist()
统计信息
- 总下载量: 72.55k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 0
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-04-01