Download the PHP package clsasc/equivalent-time without Composer

On this page you can find all versions of the php package clsasc/equivalent-time. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package equivalent-time

EquivalentTime

A class based implementation of the British Swimming/SPORTSYSTEMS Equivalent Time Algorithm. Written in-house by Chester-le-Street ASC.

Basic Usage

  1. Install via composer

  2. From there, create an EquivalentTime Object in your project

Parameter 1 is the length of the source pool, Parameter 2 is the event and Parameter 3 is the time, formatted as a float, seconds.hundreds - You may wish to cast this to a float, just in case your code takes in time as a string.

  1. Choose if you want the output to be formatted as a string or a float. Float output is default, but you can get it as an 'alpha format' (MM:SS:H) string by invoking the setOutputAsString(); method on your object. Switch back by calling the setOutputAsReal(); method on your object.

  2. Get your output. Where the parameter is the length of pool you would like your time to be converted to.

  3. You can call the getConversion($length) method on your conversion object as many times as you wish. To convert another time, create a new object and the old one will be garbage collected by PHP after it is no longer referenced.

Documentation

Full API Style documentation is available (phpDocumentor).

Accepted Source Pool Lengths

Source Pool Length names are shown as they should be entered as a string to the converter object.

The same strings as listed below should be used when calling a method to obtain a converted time, though you should always try {...} catch (Exception ...) {...} when calling the method as if the event cannot be swum in the distance you have requested, the converter will throw an exception to alert you to the problem.

Accepted Events

Below is a list of events accepted by the time converter. Some events are only accepted for a subset of source pool lengths, described by the list following the event name. If you do try to create an object with an event and source pool length which are incompatible, an exception will be thrown, which you should catch....

Event names are shown as they should be entered as a string to the converter object.

Exceptions

The system will throw exceptions for error conditions. Please read the docs for full details on these.


All versions of equivalent-time with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package clsasc/equivalent-time contains the following files

Loading the files please wait ....