Compare commits

...

1 Commits
master ... 0.1

Author SHA1 Message Date
R. Eric Wheeler 7f645f3002 added array_pop and non array_* functions 2016-07-22 14:35:40 -07:00
4 changed files with 895 additions and 685 deletions

View File

@ -33,5 +33,10 @@
"Sikofitt\\Tests\\": "tests/Sikofitt/Tests/"
}
},
"extra":{
"branch-alias": {
"dev-master": "0.1"
}
},
"minimum-stability": "stable"
}

262
composer.lock generated
View File

@ -4,8 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "e783c69d217d2ee4cd8d84375554030d",
"content-hash": "a03a3e83bc124fad42d5a75c770dc38a",
"hash": "7a143d2b80a8fbc2a3a2ba8f3a471dcc",
"content-hash": "a5f532508427f4bca1f34f14b1aa4688",
"packages": [
{
"name": "ircmaxell/password-compat",
@ -424,38 +424,87 @@
"time": "2015-03-18 18:23:50"
},
{
"name": "phpdocumentor/reflection-docblock",
"version": "2.0.4",
"name": "phpdocumentor/reflection-common",
"version": "1.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8"
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
"reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8",
"reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c",
"reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
"php": ">=5.5"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
},
"suggest": {
"dflydev/markdown": "~1.0",
"erusev/parsedown": "~1.0"
"phpunit/phpunit": "^4.6"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-0": {
"phpDocumentor": [
"psr-4": {
"phpDocumentor\\Reflection\\": [
"src"
]
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jaap van Otterdijk",
"email": "opensource@ijaap.nl"
}
],
"description": "Common reflection classes used by phpdocumentor to reflect the code structure",
"homepage": "http://www.phpdoc.org",
"keywords": [
"FQSEN",
"phpDocumentor",
"phpdoc",
"reflection",
"static analysis"
],
"time": "2015-12-27 11:43:31"
},
{
"name": "phpdocumentor/reflection-docblock",
"version": "3.1.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "9270140b940ff02e58ec577c237274e92cd40cdd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9270140b940ff02e58ec577c237274e92cd40cdd",
"reference": "9270140b940ff02e58ec577c237274e92cd40cdd",
"shasum": ""
},
"require": {
"php": ">=5.5",
"phpdocumentor/reflection-common": "^1.0@dev",
"phpdocumentor/type-resolver": "^0.2.0",
"webmozart/assert": "^1.0"
},
"require-dev": {
"mockery/mockery": "^0.9.4",
"phpunit/phpunit": "^4.4"
},
"type": "library",
"autoload": {
"psr-4": {
"phpDocumentor\\Reflection\\": [
"src/"
]
}
@ -467,10 +516,58 @@
"authors": [
{
"name": "Mike van Riel",
"email": "mike.vanriel@naenius.com"
"email": "me@mikevanriel.com"
}
],
"time": "2015-02-03 12:10:50"
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"time": "2016-06-10 09:48:41"
},
{
"name": "phpdocumentor/type-resolver",
"version": "0.2",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b39c7a5b194f9ed7bd0dd345c751007a41862443",
"reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443",
"shasum": ""
},
"require": {
"php": ">=5.5",
"phpdocumentor/reflection-common": "^1.0"
},
"require-dev": {
"mockery/mockery": "^0.9.4",
"phpunit/phpunit": "^5.2||^4.8.24"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"phpDocumentor\\Reflection\\": [
"src/"
]
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mike van Riel",
"email": "me@mikevanriel.com"
}
],
"time": "2016-06-10 07:14:17"
},
{
"name": "phpspec/prophecy",
@ -1375,21 +1472,21 @@
},
{
"name": "symfony/config",
"version": "v2.8.8",
"version": "v3.1.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
"reference": "0926e69411eba491803dbafb9f1f233e2ced58d0"
"reference": "bcf5aebabc95b56e370e13d78565f74c7d8726dc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/config/zipball/0926e69411eba491803dbafb9f1f233e2ced58d0",
"reference": "0926e69411eba491803dbafb9f1f233e2ced58d0",
"url": "https://api.github.com/repos/symfony/config/zipball/bcf5aebabc95b56e370e13d78565f74c7d8726dc",
"reference": "bcf5aebabc95b56e370e13d78565f74c7d8726dc",
"shasum": ""
},
"require": {
"php": ">=5.3.9",
"symfony/filesystem": "~2.3|~3.0.0"
"php": ">=5.5.9",
"symfony/filesystem": "~2.8|~3.0"
},
"suggest": {
"symfony/yaml": "To use the yaml reference dumper"
@ -1397,7 +1494,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.8-dev"
"dev-master": "3.1-dev"
}
},
"autoload": {
@ -1424,30 +1521,30 @@
],
"description": "Symfony Config Component",
"homepage": "https://symfony.com",
"time": "2016-06-29 05:31:50"
"time": "2016-06-29 05:41:56"
},
{
"name": "symfony/console",
"version": "v2.8.8",
"version": "v3.1.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "c392a6ec72f2122748032c2ad6870420561ffcfa"
"reference": "747154aa69b0f83cd02fc9aa554836dee417631a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/c392a6ec72f2122748032c2ad6870420561ffcfa",
"reference": "c392a6ec72f2122748032c2ad6870420561ffcfa",
"url": "https://api.github.com/repos/symfony/console/zipball/747154aa69b0f83cd02fc9aa554836dee417631a",
"reference": "747154aa69b0f83cd02fc9aa554836dee417631a",
"shasum": ""
},
"require": {
"php": ">=5.3.9",
"php": ">=5.5.9",
"symfony/polyfill-mbstring": "~1.0"
},
"require-dev": {
"psr/log": "~1.0",
"symfony/event-dispatcher": "~2.1|~3.0.0",
"symfony/process": "~2.1|~3.0.0"
"symfony/event-dispatcher": "~2.8|~3.0",
"symfony/process": "~2.8|~3.0"
},
"suggest": {
"psr/log": "For using the console logger",
@ -1457,7 +1554,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.8-dev"
"dev-master": "3.1-dev"
}
},
"autoload": {
@ -1484,7 +1581,7 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
"time": "2016-06-29 07:02:14"
"time": "2016-06-29 07:02:31"
},
{
"name": "symfony/event-dispatcher",
@ -1548,25 +1645,25 @@
},
{
"name": "symfony/filesystem",
"version": "v2.8.8",
"version": "v3.1.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
"reference": "7258ddd6f987053f21fa43d03430580ba54e6096"
"reference": "322da5f0910d8aa0b25fa65ffccaba68dbddb890"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/7258ddd6f987053f21fa43d03430580ba54e6096",
"reference": "7258ddd6f987053f21fa43d03430580ba54e6096",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/322da5f0910d8aa0b25fa65ffccaba68dbddb890",
"reference": "322da5f0910d8aa0b25fa65ffccaba68dbddb890",
"shasum": ""
},
"require": {
"php": ">=5.3.9"
"php": ">=5.5.9"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.8-dev"
"dev-master": "3.1-dev"
}
},
"autoload": {
@ -1593,7 +1690,7 @@
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
"time": "2016-06-29 05:31:50"
"time": "2016-06-29 05:41:56"
},
{
"name": "symfony/polyfill-mbstring",
@ -1656,25 +1753,25 @@
},
{
"name": "symfony/stopwatch",
"version": "v2.8.8",
"version": "v3.1.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/stopwatch.git",
"reference": "35bae476693150728b0eb51647faac82faf9aaca"
"reference": "bb42806b12c5f89db4ebf64af6741afe6d8457e1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/stopwatch/zipball/35bae476693150728b0eb51647faac82faf9aaca",
"reference": "35bae476693150728b0eb51647faac82faf9aaca",
"url": "https://api.github.com/repos/symfony/stopwatch/zipball/bb42806b12c5f89db4ebf64af6741afe6d8457e1",
"reference": "bb42806b12c5f89db4ebf64af6741afe6d8457e1",
"shasum": ""
},
"require": {
"php": ">=5.3.9"
"php": ">=5.5.9"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.8-dev"
"dev-master": "3.1-dev"
}
},
"autoload": {
@ -1701,29 +1798,29 @@
],
"description": "Symfony Stopwatch Component",
"homepage": "https://symfony.com",
"time": "2016-06-29 05:29:29"
"time": "2016-06-29 05:41:56"
},
{
"name": "symfony/yaml",
"version": "v2.8.8",
"version": "v3.1.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "dba4bb5846798cd12f32e2d8f3f35d77045773c8"
"reference": "2884c26ce4c1d61aebf423a8b912950fe7c764de"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/dba4bb5846798cd12f32e2d8f3f35d77045773c8",
"reference": "dba4bb5846798cd12f32e2d8f3f35d77045773c8",
"url": "https://api.github.com/repos/symfony/yaml/zipball/2884c26ce4c1d61aebf423a8b912950fe7c764de",
"reference": "2884c26ce4c1d61aebf423a8b912950fe7c764de",
"shasum": ""
},
"require": {
"php": ">=5.3.9"
"php": ">=5.5.9"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.8-dev"
"dev-master": "3.1-dev"
}
},
"autoload": {
@ -1750,7 +1847,56 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
"time": "2016-06-29 05:29:29"
"time": "2016-06-29 05:41:56"
},
{
"name": "webmozart/assert",
"version": "1.0.2",
"source": {
"type": "git",
"url": "https://github.com/webmozart/assert.git",
"reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webmozart/assert/zipball/30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde",
"reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"phpunit/phpunit": "^4.6"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"psr-4": {
"Webmozart\\Assert\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Bernhard Schussek",
"email": "bschussek@gmail.com"
}
],
"description": "Assertions to validate method input/output with nice error messages.",
"keywords": [
"assert",
"check",
"validate"
],
"time": "2015-08-24 13:29:44"
}
],
"aliases": [],
@ -1759,7 +1905,7 @@
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": ">=5.3.29"
"php": ">=5.3"
},
"platform-dev": []
}

View File

@ -19,17 +19,10 @@ namespace Sikofitt\Utility;
*
* @package Sikofitt\Utility
*/
use Guzzle\Common\Exception\BadMethodCallException;
/**
* Class ArrayObjectArray
*
* @package Sikofitt\Utility
*/
class ArrayObjectArray extends \ArrayObject implements \IteratorAggregate
{
/**
* @var \ArrayIterator
* @var \Iterator
*/
private $iterator;
@ -64,11 +57,14 @@ class ArrayObjectArray extends \ArrayObject implements \IteratorAggregate
}
/**
* Alias of current
*
* @return int
* Current position of the array
*/
public function pos()
{
return pos($this->iterator);
return $this->current();
}
/**
@ -167,11 +163,20 @@ class ArrayObjectArray extends \ArrayObject implements \IteratorAggregate
$argv[0],
$this->getArrayCopy()
);
break;
case 'array_map':
$callback = $argv[0];
array_shift($argv);
return call_user_func_array('array_map', array_merge(array($callback), array($this->getArrayCopy()), $argv));
break;
case 'array_pop':
$arrayCopy = $this->getArrayCopy();
if(null !== $returnValue = array_pop($arrayCopy))
{
$this->exchangeArray($arrayCopy);
}
return $returnValue;
break;
default:
return call_user_func_array(
$function,

File diff suppressed because it is too large Load Diff