public function readProperties($object)
    {
        if (!is_object($object)) {
            throw new InvalidArgumentException(1, 'object');
        }

        $reflector = new \ReflectionObject($object);
        $result    = array();

        // Iterate over the properties of the object.
        foreach ($reflector->getProperties() as $property) {
            $property->setAccessible(true);
            $result[$property->getName()] = $property->getValue($object);
        }

        return $result;
    }