public function arrayToObject($array)
    {
        $object = new \stdClass();
        foreach ($array as $k => $v) {
            if (is_array($v)) {
                // load nested elements
                $v = $this->arrayToObject($v);
            }
            $object->{$k} = $v;
        }

        return $object;
    }
public function arrayToObject($array)
    {
        $object = new \stdClass();
        foreach ($array as $k => $v) {
            if (is_array($v)) {
                // load nested elements
                $v = $this->arrayToObject($v);
            }
            $object->{$k} = $v;
        }

        return $object;
    }
public function arrayToObject ( $ array ) { $ object = new \ stdClass ( ) ; foreach ( $ array as $ k => $ v ) { if ( is_array ( $ v ) ) { // load nested elements $ v = $ this -> arrayToObject ( $ v ) ; } $ object -> { $ k } = $ v ; } return $ object ; }
Assmbles an object from given array

@param array $array

@return \stdClass
Assmbles an object from given array