2017 © Pedro Peláez
 

library powerball

Get all drawings from powerball.com.

image

paulboco/powerball

Get all drawings from powerball.com.

  • Thursday, April 14, 2016
  • by paulboco
  • Repository
  • 1 Watchers
  • 0 Stars
  • 13 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

Powerball

Build Status Latest Stable Version Total Downloads License, (*1)

All Powerball drawings are available at the powerball.com website in a plain text file. This file is updated shortly after each drawing which occurs at 10:59 p.m. Eastern Time on Wednesday and Saturday nights., (*2)

This package parses that text file into an array., (*3)

Installation

Require this package with composer:, (*4)

composer require paulboco/powerball

Usage

Facade:

<?php

namespace Paulboco\Powerball\Drawings;

$drawingFacade = new DrawingFacade();
$length = $drawingFacade->length();
$drawings = $drawingFacade->all();

var_dump($length, $drawings);

Verbose:

<?php

namespace Paulboco\Powerball\Drawings;

$fileHandler = new FileHandler(new FileValidator, new FileSizer);
$length = $fileHandler->getContentLength();
$content = $fileHandler->getContent();

$fileParser = new FileParser();
$drawings = $fileParser->parse($content);

var_dump($length, $drawings);

Return:

The parser returns an array where each element represents a powerball drawing. Drawings are in ascending order by date and each is structured as:, (*5)

$drawing = [
    'date' => '2016-03-19',
    'ball_1' => 11,
    'ball_2' => 60,
    'ball_3' => 23,
    'ball_4' => 54,
    'ball_5' => 43,
    'power_ball' => 3,
    'power_play' => 3,
];

The Versions

14/04 2016

dev-master

9999999-dev

Get all drawings from powerball.com.

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

by Paul Sellers

14/04 2016

3.0.0

3.0.0.0

Get all drawings from powerball.com.

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

by Paul Sellers

21/03 2016

2.0.2

2.0.2.0

Get all drawings from powerball.com.

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

by Paul Sellers

21/03 2016

2.0.1

2.0.1.0

Get all drawings from powerball.com.

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

by Paul Sellers

21/03 2016

2.0.0

2.0.0.0

Get all drawings from powerball.com.

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

by Paul Sellers

21/03 2016

1.0.2

1.0.2.0

Get all drawings from powerball.com.

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

by Paul Sellers

20/03 2016

1.0.1

1.0.1.0

Get all drawings from powerball.com.

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

by Paul Sellers

20/03 2016

1.0.0

1.0.0.0

Get all drawings from powerball.com.

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

by Paul Sellers