2017 © Pedro Peláez
 

library primitives

Primitives classes for ObjectivePHP

image

objective-php/primitives

Primitives classes for ObjectivePHP

  • Wednesday, April 11, 2018
  • by gauthier
  • Repository
  • 8 Watchers
  • 7 Stars
  • 22,635 Installations
  • PHP
  • 18 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 18 Versions
  • 13 % Grown

The README.md

Objective PHP / Primitives Build Status

Disclaimer

This document is written in globish, the flavour of English we're trying to use in France. We know how bad our english is, please don't pay too much attention to it :), (*1)

Although we're thinking to this library for a while now, its implementation is still in early stage, and for the next coming months, you'll probably see a few code and a lot of changes in it. This means that if you're interested in this project, you're more than welcome to try it, contribute to it, make proposals for it, but please don't use it in production projects for now!, (*2)

Project introduction

Primitives objects are foundation of Objective PHP. Objective PHP aims at providing some high-level component to provide PHP with a more objective syntax. The goals of Objective PHP libraries can be summed up like this:, (*3)

  • make extensive use of PHP OOP capabilities
  • work with data objects, no multipurpose, dummy containers (aka variables)
  • package commonly needed data processing into reliable, efficient and unit tested methods
  • turn any error in Exception to ease failure handling
  • bring to PHP a more elegant, modern and fluent way to write code (partly inspired by Javascript)
  • auto-completion minded library for enhancing developer productivity
  • make use of more language's features (like closures)

Our primitives library is intended achieve most of these goals. The very first set of object will contain:, (*4)

  • ObjectivePHP\Primitives\String
  • ObjectivePHP\Primitives\Collection

Each of them will both wrap native functions in a object-oriented way and expose higher level methods to perform many usual data manipulation over those. More on this coming soon, in another document describing the coding standard and rules., (*5)

What's next?

First, we'll focus on the three above mentioned classes. We'll consider releasing a 1.0 version once they are ready to get implemented in third-party code with total reliability. Starting from here, we'll be able to work on a much more detailed roadmap., (*6)

This roadmap will not only anticipate Primitives library evolutions, but also include parallel development of extended libraries, built on top of Primitives, and offering some even higher level components for real life use:, (*7)

  • HTML Tag
  • CSS Styles
  • File/Stream
  • Image
  • Point (coordinates)
  • ...

These are just some examples of what kind of classes we intend to work on, but much more are to come., (*8)

Once again, you all are invited to contribute by submitting us proposals, trying and testing what we do, contribute (code or documentation). For any contact, please drop us a message at team@objective-php.org, (*9)

Installation

Manual

You can clone our Github repository by running:, (*10)

git clone http://github.com/objective-php/primitives

If you're to proceed this way, you probably don't need more explanation about how to use the library :), (*11)

Composer

The easiest way to install the library and get ready to play with it is by using Composer. Run the following command in an empty folder you just created for Primitives:, (*12)

composer require --dev objective-php/primitives:dev-master 

Then, you can start coding using primitive classes by requiring Composer's autoload.php located in its vendor directory., (*13)

Hmm, before starting coding, please take the time to read this file till the end :), (*14)

How to test the work in progress?

Run unit tests

First of all, before playing around with our primitives, please always run the unit tests suite. Our tests are written using PHPUnit, and can be run as follow:, (*15)

cd [clone directory]/tests
./phpunit .

Write some code

At this time, you're on your own to find out what Primitives can do for you, sorry for that, we'll soon work on some samples to help you getting started. Meanwhile, you can instantiate the various classes and learn by yourself their capabilities by relying on your IDE auto-completion feature ;), (*16)

use ObjectivePHP\Primitives\String;
use ObjectivePHP\Primitives\Collection;

// allow Primitives classes autoloading
// Note: this is assuming you used Composer to install the library!
require 'vendor/autoload.php';

$identifier = new String(uniqid());
$server = new Collection($_SERVER);

May the OOP be with PHP!, (*17)

The Versions

11/04 2018

dev-exception

dev-exception https://github.com/objective-php/primitives

Primitives classes for ObjectivePHP

  Sources   Download

GPL-3.0

The Requires

  • php >=7.0.0

 

The Development Requires

collection primitives objective php

28/03 2018

dev-master

9999999-dev https://github.com/objective-php/primitives

Primitives classes for ObjectivePHP

  Sources   Download

GPL-3.0

The Requires

  • php >=7.0.0

 

The Development Requires

collection primitives objective php

28/03 2018

v2.0.0

2.0.0.0 https://github.com/objective-php/primitives

Primitives classes for ObjectivePHP

  Sources   Download

GPL-3.0

The Requires

  • php >=7.0.0

 

The Development Requires

collection primitives objective php

27/03 2018

dev-docAndTest

dev-docAndTest https://github.com/objective-php/primitives

Primitives classes for ObjectivePHP

  Sources   Download

GPL-3.0

The Requires

  • php >=7.0.0

 

The Development Requires

collection primitives objective php

27/03 2018

dev-wip_collection

dev-wip_collection https://github.com/objective-php/primitives

Primitives classes for ObjectivePHP

  Sources   Download

GPL-3.0

The Requires

  • php >=7.0.0

 

The Development Requires

collection primitives objective php

04/09 2017

v1.3.7

1.3.7.0 https://github.com/objective-php/primitives

Primitives classes for ObjectivePHP

  Sources   Download

GPL-3.0

The Requires

  • php >=7.0.0

 

The Development Requires

primitives objective php

04/07 2017

v1.3.6

1.3.6.0 https://github.com/objective-php/primitives

Primitives classes for ObjectivePHP

  Sources   Download

GPL-3.0

The Requires

  • php >=7.0.0

 

The Development Requires

primitives objective php

23/05 2017

v1.3.5

1.3.5.0 https://github.com/objective-php/primitives

Primitives classes for ObjectivePHP

  Sources   Download

GPL-3.0

The Requires

  • php >=7.0.0

 

The Development Requires

primitives objective php

23/05 2017

v1.3.4

1.3.4.0 https://github.com/objective-php/primitives

Primitives classes for ObjectivePHP

  Sources   Download

GPL-3.0

The Requires

  • php >=7.0.0

 

The Development Requires

primitives objective php

10/09 2016

v1.3.3

1.3.3.0 https://github.com/objective-php/primitives

Primitives classes for ObjectivePHP

  Sources   Download

GPL-3.0

The Requires

  • php >=7.0.0

 

The Development Requires

primitives objective php

08/09 2016

v1.3.2

1.3.2.0 https://github.com/objective-php/primitives

Primitives classes for ObjectivePHP

  Sources   Download

GPL-3.0

The Requires

  • php >=7.0.0

 

The Development Requires

primitives objective php

12/05 2016

v1.3.1

1.3.1.0 https://github.com/objective-php/primitives

Primitives classes for ObjectivePHP

  Sources   Download

GPL-3.0

The Requires

  • php >=7.0.0

 

The Development Requires

primitives objective php

05/05 2016

v1.3.0

1.3.0.0 https://github.com/objective-php/primitives

Primitives classes for ObjectivePHP

  Sources   Download

GPL-3.0

The Requires

  • php >=7.0.0

 

The Development Requires

primitives objective php

09/08 2015

v1.2.0

1.2.0.0 https://github.com/objective-php/primitives

Primitives classes for ObjectivePHP

  Sources   Download

GPL-3.0

The Requires

  • php >=5.6.0

 

The Development Requires

primitives objective php

09/08 2015

v1.1.1

1.1.1.0 https://github.com/objective-php/primitives

Primitives classes for ObjectivePHP

  Sources   Download

GPL-3.0

The Requires

  • php >=5.6.0

 

The Development Requires

primitives objective php

04/08 2015

v1.1.0

1.1.0.0 https://github.com/objective-php/primitives

Primitives classes for ObjectivePHP

  Sources   Download

GPL-3.0

The Requires

  • php >=5.6.0

 

The Development Requires

primitives objective php

18/05 2015

v1.0.1

1.0.1.0 https://github.com/objective-php/primitives

Primitives classes for ObjectivePHP

  Sources   Download

GPL-3.0

The Requires

  • php >=5.5.0

 

The Development Requires

primitives objective php

18/05 2015

v1.0

1.0.0.0 https://github.com/objective-php/primitives

Primitives classes for ObjectivePHP

  Sources   Download

GPL-3.0

The Requires

  • php >=5.5.0

 

The Development Requires

primitives objective php