3ev/repoman 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

3ev/repoman

最新稳定版本:v1.0.0

Composer 安装命令:

composer require 3ev/repoman

包简介

Lightweight repository pattern implementation

README 文档

README

#Repoman

Lightweight repository pattern interfaces and implementations.

See this article for a description of the repository pattern in Laravel.

##Installation

$ composer require "3ev/repoman:~1.0"

##Usage

Repoman provides a basic interface for a repository. You can implement it yourself, or leverage one of the supplied implementations. You can extend the interface for your own specific repository classes.

See the phpdoc in the source files for information on the API and errors.

###Basic implementation

<?php
namespace Entity\Repositories;

use Tev\Repoman\Repositories\RepositoryInterface;

class Repository implements RepositoryInterface
{
    public function getAll()
    {
        // ...
    }

    public function chunk($size, $callback)
    {
        // ...
    }

    public function find($id)
    {
        // ...
    }

    public function create(array $data)
    {
        // ...
    }

    public function update($id, array $data)
    {
        // ...
    }

    public function delete($id)
    {
        // ...
    }
}

###Eloquent

<?php
namespace Entity\Repositories\Eloquent;

use Entity\Models\ExampleModel;
use Tev\Repoman\Repositories\Eloquent\Repository;

class ExampleModelRepository extends Repository
{
    public function __construct()
    {
        $this->model = new ExampleModel;
    }
}

##License

MIT

统计信息

  • 总下载量: 458
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 13
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 8
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-05-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固