承接 mikelooper/container-settings 相关项目开发

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

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

mikelooper/container-settings

最新稳定版本:0.0.5

Composer 安装命令:

composer require mikelooper/container-settings

包简介

A template to create libraries

关键字:

README 文档

README

This is a package provides a factory called ContainerFactory, a container (PSR-11) using PHP-DI. This container will have an implementation of SettingsInterface that implementation allow access to the settings using "dot annotations". Also, you can optimize perform in your project using the cache feature.

Example use

To use this package you need create a file or an array, in case of use a file you must return an array in that. Here you can see an example of use:

// settings.php
return [
    'foo' => [
        'bar' => 1
    ]
];
// index.php
use ContainerFactory;

$settingsPath = __DIR__ . '/settings.php'; // or array
$container = ContainerFactory::create($settingsPath);

$settings = $container->get(SettingsInterface::class');
$number = $settings->get('foo.bar');
echo $number; // 1

Make commands

$ make help

Usage: make [target] ...

Container:
  run                 Build and run php container
  build               Build php container
  stop                Stop php container
  destroy             Remove all data related with php container
  shell               SHH in container
  logs                Show logs in container
                      
Miscellaneous:
  help                Show this help
                      
Code:
  exec                Execute composer commands
                      
Tests:
  test                Execute tests
  test-coverage       Execute tests with coverage
                      
Style:
  lint                Show style errors
  lint-fix            Fix style errors
                      
Written by Antonio Miguel Morillo Chica, version v1.0
Please report any bug or error to the author.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-11-25