perf / source
Data source abstraction
Installs: 315
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/perf/source
Requires
- php: >=7.4
Requires (Dev)
- ext-xdebug: *
- phing/phing: ^2.16
- phpmd/phpmd: ^2.8
- phpunit/phpunit: ^9.2
- squizlabs/php_codesniffer: ^3.5
README
Source package allows to abstract data sources.
Installation & Requirements
Source has no dependencies on other libraries.
Install it with Composer:
{ "require": { "perf/source" : "~1.0" } }
Usage
Local file source
<?php $path = '/foo/bar/settings.ini'; $source = \perf\Source\LocalFileSource::create($path); function print_content(\perf\Source\Source $source) { echo $source->getContent(); }
String source
<?php $string = 'foo = bar'; $source = \perf\Source\StringSource::create($string); function print_content(\perf\Source\Source $source) { echo $source->getContent(); }