willskates/arrayfetcher

A simple library loads arrays from different source files of different types.

1.0.2 2015-02-05 12:00 UTC

This package is not auto-updated.

Last update: 2024-12-17 04:09:21 UTC


README

#Array Fetcher

A simple library that allows you to get an array of information from a file.

##Build Status Build Status

##Requirements

PHP 5.4

##Installation

You should install Array Fetcher using composer.
{
    "require": {
        "willskates/arrayfetcher": "1.*"
    }
}

##Usage

###Getting an array from a file.

use WillSkates\ArrayFetcher\ArrayFetcher;

$fetcher = new ArrayFetcher();
$array = $fetcher->fetch('/path/to/filename.extension');

###Getting an array from a file contained within a base directrory.

use WillSkates\ArrayFetcher\ArrayFetcher;

$dir = new ArrayFetcher('/path/to/dir');
$array = $dir->fetch('filename.extension');