2017 © Pedro Peláez
 

library stl

Standard Type Lib

image

agmakonts/stl

Standard Type Lib

  • Saturday, August 22, 2015
  • by AdamiecRadek
  • Repository
  • 4 Watchers
  • 6 Stars
  • 2,143 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 24 Versions
  • 0 % Grown

The README.md

STL

Development: Scrutinizer Code Quality Code Coverage Build Status, (*1)

Simple Type Lib for PHP

Library inspired by nicolopignatelli/valueobjects. My goal was to create a set of classes that will serve as a object oriented implementation of basic data types to fight with PHPs dynamic types and at the same time add few extra classes for common tasks. One of the main features of STL is that all objects have one instance per value String::get('Test') === String::get('Test'). Thanks to that approach it is easy to store objects in for example SPLObjectStorage or similar containers that depend od object hash., (*2)

All objects are immutable - this is required because instances are shared., (*3)

Requirements

  • PHP >= 5.4
  • OpenSSL Extension

Quick start

//Create or get String instance
$string = String::get('String value');

//Create or get Integer instance
$integer = Integer::get(12213);

//Chaining

$integer = Integer::get(10)->add(Integer::get(10));

Library parts description

Number

All classes in \Number namespace are designed to handle numeric types. Decimal internally uses strings for compatibility with bcmath functions but interface exposes scalar numbers., (*4)

DateTime

..., (*5)

Roadmap

Currently, after quite a big rebuild (that is still in progress) only String is implemented almost fully, rest of planned data types and value objects is listed below:, (*6)

  • Number
    • Integer - Ready
    • Decimal - Ready
    • Fraction
  • DateTime
    • Date
    • Year
    • Month
    • Week
    • Day
    • Time
    • Hour
    • Minute
    • Second
    • DateTime - Started
  • Structure
    • TypedArray
    • TypedList
    • Dictionary
  • Identity
    • UUID
    • Numeric
    • Alphanumeric
    • Autonumeric - Ready
  • Text
    • Word
    • Sentence
    • Paragraph

The Versions

22/08 2015

dev-master

9999999-dev

Standard Type Lib

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Michał Nicz

22/08 2015

v2.2.1.1

2.2.1.1

Standard Type Lib

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Michał Nicz

22/08 2015

dev-development

dev-development

Standard Type Lib

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Michał Nicz

20/07 2015

v2.2.0

2.2.0.0

Standard Type Lib

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Michał Nicz

20/07 2015

v2.2.1

2.2.1.0

Standard Type Lib

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Michał Nicz

15/06 2015

v1.1.0

1.1.0.0

Standard Type Lib

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Michał Nicz

15/06 2015

dev-php7-compatibility

dev-php7-compatibility

Standard Type Lib

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Michał Nicz

15/06 2015

v2.1.0

2.1.0.0

Standard Type Lib

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Michał Nicz

14/06 2015

v2.0.2

2.0.2.0

Standard Type Lib

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Michał Nicz

14/06 2015

v2.0.0

2.0.0.0

Standard Type Lib

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Michał Nicz

20/05 2015

v1.0.12

1.0.12.0

Standard Type Lib

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

20/05 2015

v2.0.1

2.0.1.0

Standard Type Lib

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

16/04 2015

v1.0.11

1.0.11.0

Standard Type Lib

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

16/04 2015

v1.0.10

1.0.10.0

Standard Type Lib

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

27/03 2015

v1.0.9

1.0.9.0

Standard Type Lib

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

20/03 2015

v1.0.8

1.0.8.0

Standard Type Lib

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

16/03 2015

v1.0.7

1.0.7.0

Standard Type Lib

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

02/03 2015

v1.0.6

1.0.6.0

Standard Type Lib

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

02/03 2015

v1.0.5

1.0.5.0

Standard Type Lib

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

25/02 2015

v1.0.4

1.0.4.0

Standard Type Lib

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

24/02 2015

v1.0.3

1.0.3.0

Standard Type Lib

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

21/02 2015
21/02 2015

v1.0.2

1.0.2.0

Standard Type Lib

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

11/02 2015