2017 © Pedro Peláez
 

library lib

Rso Library

image

rso/lib

Rso Library

  • Monday, December 30, 2013
  • by hazbo
  • Repository
  • 2 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Rso Library

Rso Library is as set of classes written in PHP that allow you to use common data types as objects., (*1)

Current Implementations

RsoArray, (*2)

RsoDictionary, (*3)

RsoMutableArray, (*4)

RsoMutableDictionary, (*5)

RsoNull, (*6)

RsoNumber, (*7)

RsoString, (*8)

Install

You can install the Rso Libraries using composer, (*9)

{
    "require" : {
        "rso/lib" : "dev-master"
    }
}

Simple Usage

RsoArray Example

<?php

require('vendor/autoload.php');

use Rso\Stdobject\RsoArray;

// Create a new instance of RsoArray
$array_one = new RsoArray();

// Or create one staticly
$array_two = RsoArray::arrayWithObjects('object 1', 'object 2', 'object 3');

// Count array elements
echo $array_two->count();

// Search through arrays
if ($array_two->containsObject('object 3')) {
    echo 'Object was found!';
}

// Enumerate through arrays using the keys and values
$array_two->enumerateObjectsUsingBlock(function($value, $key) {
    echo $value . "<br />";
});

Above is just a very small example of how the RsoArray class can be used. Array objects can also be accessed the usual way:, (*10)

echo $array_two[0];

However to set objects using this method you will need to create a mutable array., (*11)

<?php

require('vendor/autoload.php');

use Rso\Stdobject\RsoMutableArray;

// Create a new mutable array
$array = new RsoMutableArray();

// Assign a value to index 0
$array[0] = 'Zero';

echo $array[0];

Documentation

Coming Soon!, (*12)

The Versions

30/12 2013

dev-master

9999999-dev

Rso Library

  Sources   Download

The Requires

  • php >=5.3.0

 

library hazbo rso rsolibrary