承接 wmsamolet/object-map 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

wmsamolet/object-map

Composer 安装命令:

composer require wmsamolet/object-map

包简介

PHP library for mapping, linking, configuring objects using data repository

README 文档

README

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require PHP Version Require

PHP library for mapping, linking, configuring objects using data storage

Description

This library is suitable for those who want:

  • Create loosely coupled components
  • Connect and configure handler classes dynamically

Documentation

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require wmsamolet/object-map

or add

"wmsamolet/object-map": "^1.0"

to the requirement section of your composer.json file.

Basic usage

<?php

use Wmsamolet\ObjectMap\Domain\Repository\Memory\ObjectElementRepository;
use Wmsamolet\ObjectMap\Domain\Repository\Memory\ObjectLinkingRepository;
use Wmsamolet\ObjectMap\Domain\Service\ObjectMapService;

$objectMapService = new ObjectMapService(
    new ObjectElementRepository(),
    new ObjectLinkingRepository()
);

class TargetObject
{
}

class LinkedObject1
{
}

class LinkedObject2
{
}

// Add objects to map (adding information to the repository)
$objectMapService->addObjectToMap(TargetObject::class, 'Target object');
$objectMapService->addObjectToMap(LinkedObject1::class, 'Linked object #1');
$objectMapService->addObjectToMap(LinkedObject2::class, 'Linked object #2');

// Link objects to class TargetObject
$objectMapService->linkObjects(TargetObject::class, LinkedObject1::class);
$objectMapService->linkObjects(TargetObject::class, LinkedObject2::class);

// Get linked objects class name collection
$classNameCollection = $objectMapService->collectLinkedObjectsClassNames(
    TargetObject::class
);

// Get linked objects config collection ['class_name' => [...], ...]
$objectConfigCollection = $objectMapService->collectLinkedObjectsConfigs(
    TargetObject::class
);

License

PHP Object Map is licensed under the MIT License - see the LICENSE file for details

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-11-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固