2017 © Pedro Peláez
 

cakephp-plugin cakephp-interval

Interval plugin for CakePHP

image

lubos/cakephp-interval

Interval plugin for CakePHP

  • Friday, February 17, 2017
  • by LubosRemplik
  • Repository
  • 1 Watchers
  • 0 Stars
  • 61 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Interval plugin for CakePHP

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

Installation

You can install this plugin into your CakePHP application using composer., (*2)

The recommended way to install composer packages is:, (*3)

composer require lubos/cakephp-interval

Load plugin in bootstrap.php file, (*4)

bin/cake plugin load Interval

Usage

In human readable string, following can be used, (*5)

w = week
d = day
h = hour
m = minute
s = second, (*6)

$Interval = new \Interval\Interval\Interval();

// output 2w 6h
echo $Interval->toHuman((2 * 5 * 8 + 6) * 3600);

// output 36000
echo $Interval->toSeconds('1d 2h');

You can use ./src/Traits/IntervalTrait.php or cakephp component / helper., (*7)

Helper example, (*8)

// in AppView
$this->loadHelper('Interval', ['className' => '\Interval\View\Helper\IntervalHelper']);

// in Template, output 2w 6h
= $this->Interval->toHuman((2 * 5 * 8 + 6) * 3600) ?>

See ./tests/TestCase/Interval/IntervalTest.php for more examples, (*9)

Bugs & Features

For bugs and feature requests, please use the issues section of this repository., (*10)

If you want to help, pull requests are welcome.
Please follow few rules:, (*11)

The Versions

17/02 2017

dev-master

9999999-dev https://github.com/LubosRemplik/CakePHP-Interval

Interval plugin for CakePHP

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin cakephp interval

10/01 2017

0.1.1

0.1.1.0 https://github.com/LubosRemplik/CakePHP-Interval

Interval plugin for CakePHP

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin cakephp interval

10/01 2017

0.1.0

0.1.0.0 https://github.com/LubosRemplik/CakePHP-Interval

Interval plugin for CakePHP

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin cakephp interval