From 0bac7418dbfa0fdc875995e29b0886fe871b5b84 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Fri, 29 Nov 2013 00:18:38 +0100 Subject: [PATCH] Updated StackableArray --- src/utils/pthreads.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/utils/pthreads.php b/src/utils/pthreads.php index be91ec58a..134fd3f3a 100644 --- a/src/utils/pthreads.php +++ b/src/utils/pthreads.php @@ -22,8 +22,20 @@ define("ASYNC_CURL_GET", 1); define("ASYNC_CURL_POST", 2); -class StackableArray{ - public $counter = 0; +class StackableArray extends Stackable{ + public function __construct(){ + foreach(func_get_args() as $n => $value){ + if(is_array($value)){ + $this->{$n} = new StackableArray(); + call_user_func_array(array($this->{$n}, "__construct"), $value); + }else{ + $this->{$n} = $value; + } + } + } + + public function __destruct(){} + public function run(){} }