protected function _toArray($object)
    {
        $reflectionClass = new \ReflectionClass(get_class($object));
        $array           = array();
        foreach ($reflectionClass->getProperties() as $property)
        {
            $property->setAccessible(true);
            $array[$property->getName()] = $property->getValue($object);
            $property->setAccessible(false);
        }
        return $array;
    }
protected function _toArray($object)
    {
        $reflectionClass = new \ReflectionClass(get_class($object));
        $array           = array();
        foreach ($reflectionClass->getProperties() as $property)
        {
            $property->setAccessible(true);
            $array[$property->getName()] = $property->getValue($object);
            $property->setAccessible(false);
        }
        return $array;
    }
protected function _toArray ( $ object ) { $ reflectionClass = new \ ReflectionClass ( get_class ( $ object ) ) ; $ array = array ( ) ; foreach ( $ reflectionClass -> getProperties ( ) as $ property ) { $ property -> setAccessible ( true ) ; $ array [ $ property -> getName ( ) ] = $ property -> getValue ( $ object ) ; $ property -> setAccessible ( false ) ; } return $ array ; }
convert object to array
@param object $object
@return array
convert object to array