protected function convertJsonCollectionToArray()
    {
        if (!is_array($this->value) && is_object($this->value)) {
            $orientObjects = array();

            $refClass = new \ReflectionObject($this->value);
            $properties = $refClass->getProperties(\ReflectionProperty::IS_PUBLIC);

            foreach ($properties as $property) {
                $orientObjects[$property->name] = $this->value->{$property->name};
            }

            $this->setValue($orientObjects);
        }
    }
protected function convertJsonCollectionToArray()
    {
        if (!is_array($this->value) && is_object($this->value)) {
            $orientObjects = array();

            $refClass = new \ReflectionObject($this->value);
            $properties = $refClass->getProperties(\ReflectionProperty::IS_PUBLIC);

            foreach ($properties as $property) {
                $orientObjects[$property->name] = $this->value->{$property->name};
            }

            $this->setValue($orientObjects);
        }
    }
protected function convertJsonCollectionToArray ( ) { if ( ! is_array ( $ this -> value ) && is_object ( $ this -> value ) ) { $ orientObjects = array ( ) ; $ refClass = new \ ReflectionObject ( $ this -> value ) ; $ properties = $ refClass -> getProperties ( \ ReflectionProperty :: IS_PUBLIC ) ; foreach ( $ properties as $ property ) { $ orientObjects [ $ property -> name ] = $ this -> value -> { $ property -> name } ; } $ this -> setValue ( $ orientObjects ) ; } }
If a JSON value is converted in an object containing other objects to
hydrate, this method converts the main object in an array.
If a JSON value is converted in an object containing other objects to hydrate this method converts the main object in an array .