承接 vollbehr/php-reader-laminas 相关项目开发

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

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

vollbehr/php-reader-laminas

最新稳定版本:v2.0-rc1

Composer 安装命令:

composer require vollbehr/php-reader-laminas

包简介

Laminas integration bridge for vollbehr/php-reader.

README 文档

README

A lightweight integration layer that exposes the vollbehr/php-reader services through the Laminas ServiceManager. Include the module to auto-register the Vollbehr\Support\FileReaderFactory for both Laminas MVC and Mezzio applications.

Installation

composer require vollbehr/php-reader-laminas

If you rely on laminas-component-installer the module will be enabled automatically. Otherwise, add it manually:

return [
    'modules' => [
        // ...
        \Vollbehr\Bridge\Laminas\Module::class,
    ],
];

Configuration

The bridge ships with a php-reader config namespace. Override the defaults in config/autoload/*.php if you need a custom file mode:

return [
    'php-reader' => [
        'default_file_mode' => 'rb',
    ],
];

Once enabled, the ServiceManager exposes the shared factory. The example below mirrors the integration test and works for both MVC and Mezzio environments:

use Laminas\ServiceManager\ServiceManager;
use Vollbehr\Bridge\Laminas\ConfigProvider;
use Vollbehr\Support\FileReaderFactory;

$config = (new ConfigProvider())();
$config['php-reader']['default_file_mode'] = 'rb';

$container = new ServiceManager($config['service_manager']);
$container->setService('config', $config);

/** @var FileReaderFactory $factory */
$factory = $container->get(FileReaderFactory::class);
$reader  = $factory->open('/path/to/audio.mp3');

Versioning

Bridge releases track the core library's major and minor version. Tag the bridge with the same version number whenever you tag vollbehr/php-reader to keep dependency ranges aligned.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2025-09-19