public function ArrayToObj($array, $root = False){
        $obj = !$root ? new jstoreRootObject($this) : new jstoreObject($this);
        foreach( $array as $arraykey => $arrayval){
            if( is_array($arrayval) ){
                $obj->$arraykey = $this->ArrayToObj($arrayval);
            }
            else{
                $obj->$arraykey = $arrayval;
            }
        }
        return $obj;
    }
public function ArrayToObj($array, $root = False){
        $obj = !$root ? new jstoreRootObject($this) : new jstoreObject($this);
        foreach( $array as $arraykey => $arrayval){
            if( is_array($arrayval) ){
                $obj->$arraykey = $this->ArrayToObj($arrayval);
            }
            else{
                $obj->$arraykey = $arrayval;
            }
        }
        return $obj;
    }
public function ArrayToObj ( $ array , $ root = False ) { $ obj = ! $ root ? new jstoreRootObject ( $ this ) : new jstoreObject ( $ this ) ; foreach ( $ array as $ arraykey => $ arrayval ) { if ( is_array ( $ arrayval ) ) { $ obj -> $ arraykey = $ this -> ArrayToObj ( $ arrayval ) ; } else { $ obj -> $ arraykey = $ arrayval ; } } return $ obj ; }
Same as JsonToObj, except it takes in an array, rather than a JSON
For both methods, this is where the work actually happens
Same as JsonToObj except it takes in an array rather than a JSON For both methods this is where the work actually happens