承接 arifmahmudrana/context 相关项目开发

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

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

arifmahmudrana/context

Composer 安装命令:

composer require arifmahmudrana/context

包简介

PHP single context. Key value store in current context.

README 文档

README

Build Status

This is nothing but a key value store in the current context. You store value & in other places you retrieve value by it's key.

Usage

Step 1: Install Through Composer

composer require arifmahmudrana/context

and that's it.

Examples

Set Value

use ArifMahmudRana\Context\ContextContainer;

ContextContainer::set('user', User::find(1))//Save user Returns true

Get Value

use ArifMahmudRana\Context\ContextContainer;

ContextContainer::get('user')//Get user

Has Value

use ArifMahmudRana\Context\ContextContainer;

ContextContainer::has('user')//Return true

All Value

use ArifMahmudRana\Context\ContextContainer;

ContextContainer::all()//Returns key value ['user' => User Object] default empty array

Remove Value

use ArifMahmudRana\Context\ContextContainer;

ContextContainer::remove('user')//Returns true removes the key

Important

  1. You can't instantiate this class if tried it will throw CannotInstantiateClassExceptions exception
  2. You can use only string as key else it will throw \InvalidArgumentException exception

Tests

To Run the tests

./vendor/bin/phpunit //run phpunit

Contributing

All contributions are welcome, for any bug, issue or merge request please refer to CONTRIBUTING.md

License

Released under the MIT License, see LICENSE.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-02-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固