PHP Classes

File: README.md

Recommend this page to a friend!
  Classes of Tomas Pavlatka   PTX PHP GD Analog Clock   README.md   Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Auxiliary data
Class: PTX PHP GD Analog Clock
Render the time on analog clock as an image
Author: By
Last change:
Date: 9 years ago
Size: 658 bytes
 

Contents

Class file image Download

PTX-Clock

PHP Class to create analog clock from the time given. I have a son and they are teaching him at school the clock. I though it would be great to create a simple game to help him out. This class is just a beginning of the whole idea.

Installation

You will need a composer to install autoload for you

composer install --no-dev

Example

require_once './vendor/autoload.php';

try {
    $clock = new PTX\Clock('09:55');
    $clock->draw();
    $clock->to_browser();
} catch(\PTX\ClockException $e) {
    echo $e->getMessage();
}

Example online

Visit my page and see it in action.