2017 © Pedro Peláez
 

library downloads

image

germania-kg/downloads

  • Wednesday, September 6, 2017
  • by germania-kg
  • Repository
  • 2 Watchers
  • 0 Stars
  • 13 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 3 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

Germania KG · Downloads

This package was destilled from legacy code!
You better do not want it to use this in production., (*1)

Packagist Tests, (*2)

Installation with Composer

$ composer require germania-kg/downloads

MySQL: This package requires some MySQL tables downloads, downloads_categories_mm and downloads_worlds_mm which you can install using germania_downloads.sql in sql/ directory., (*3)

Usage

While the Downloads class is a simple storage, PdoDownloads reads all downloads from the database. They both implement the container-interop (upcoming PSR 11 standard), IteratorAggregate and SPL's Countable., (*4)

You can iterate over it all worlds due to its interface, and you can retrieve single Download instances:, (*5)

setUrl( 'http://...' );
$downloads->push( $download );

// Or, get all from PDO datebase:
$downloads = new PdoDownloads( $pdo );

// Check on ID and retrieve
$check = $downloads->has( 42 );
$my_download = $downloads->get( 42 );

echo $my_download->getUrl();
?>

Development

$ git clone https://github.com/GermaniaKG/Downloads.git
$ cd Downloads
$ composer install

Unit tests

Either copy phpunit.xml.dist to phpunit.xml and adapt to your needs, or leave as is. Run PhpUnit test or composer scripts like this:, (*6)

$ composer test
# or
$ vendor/bin/phpunit

The Versions

06/09 2017
24/10 2016

1.0.1

1.0.1.0

  Sources   Download

proprietary

The Requires

 

The Development Requires

by Carsten Witt

24/10 2016

1.0.0

1.0.0.0

  Sources   Download

proprietary

The Requires

 

The Development Requires

by Carsten Witt