Activity object data getter.

@param ComActivitiesActivityObjectInterface $object The activity object.
@return array The object data.
975417
protected function _getObjectData(ComActivitiesActivityObjectInterface $object)
    {
        $data = $object->toArray();

        // Make sure we get fully qualified URLs.
        if ($url = $object->getUrl()) {
            $data['url'] = $this->_getUrl($url);
        }

        $attachments = array();

        // Handle attachments recursively.
        foreach ($object->getAttachments() as $attachment) {
            $attachments[] = $this->_getObjectData($attachment);
        }

        $data['attachments'] = $attachments;

        // Convert date objects to date time strings.
        foreach (array('published', 'updated') as $property)
        {
            $method = 'get' . ucfirst($property);

            if ($date = $object->$method()) {
                $data[$property] = $date->format('M d Y H:i:s');
            }
        }

        foreach ($object as $key => $value)
        {
            if ($value instanceof ComActivitiesActivityObjectInterface) {
                $data[$key] = $this->_getObjectData($value);
            }

            if ($value instanceof ComActivitiesActivityMedialinkInterface) {
                $data[$key] = $this->_getMedialinkData($value);
            }
        }

        return $this->_cleanupData($data);
    }
580997
public static function getObjectClass($object)
    {
        if(is_object($object))
        {
            if($object instanceof IBean)
            {
                return get_parent_class($object);
            }
            else
            {
                return get_class($object);
            }
        }
        else
        {
            return (string)$object;
        }
    }
61752
protected function getObjectValues(object $object): array
    {
        $class = new ReflectionClass(get_class($object));
        $constructor = $class->getConstructor();
        if ($constructor instanceof ReflectionMethod) {
            foreach ($constructor->getParameters() as $parameter) {
                $name = $parameter->getName();

                $property = $class->getProperty($name);
                $property->setAccessible(true);

                $value = $property->getValue($object);
                if (is_object($value) === true) {
                    $value = $this->getObjectValues($value);
                }

                $data[$name] = $value;
            }
        }

        return $data ?? [];
    }
1077497
public static function exportObjectMethods($object) {
        $methods = [];
        foreach (get_class_methods($object) as $method) {
            if ($method[0] === '_') {
                continue;
            }
            $methods[$method] = [$object, $method];
        }
        return $methods;
    }
969458
protected function getActorFromObject($object)
    {
        $entryObject = [null, null, null];

        if (is_object($object)) {
            $entryObject[2] = $object->getId();
            $pathParts      = explode('\\', get_class($object));
            $entryObject[1] = array_pop($pathParts);
            foreach ($pathParts as $pathPart) {
                if (strstr($pathPart, 'Bundle')) {
                    $entryObject[0] = $pathPart;
                    break;
                }
            }
        }

        return $entryObject;
    }
190642
public function extract($object)
    {
        $data = [
            'login' => $object->getLogin(),
            'name' => $object->getName(),
            'email' => $object->getEmail(),
            'role' => $object->getRole(),
        ];
        if ($object->getId() !== null) {
            $data['id'] = $object->getId();
        }
        return $data;
    }
376469
public function extract($object)
    {
        $data = [
            'environment_id' => $object->getEnvironment()->getId(),
            'released_at' => $object->getReleasedAt() !== null ? $object->getReleasedAt()->format(self::SQL_FORMAT) : null,
            'released_by' => $object->getReleasedBy(),
            'comment' => $object->getComment()
        ];
        if ($object->getId()) {
            $data['id'] = $object->getId();
        }
        return $data;
    }
692268
protected function _getObjects(array $labels = array())
    {
        $objects = array();

        foreach ($labels as $label)
        {
            $method = 'getActivity' . ucfirst($label);

            if (method_exists($this, $method))
            {
                $object = $this->$method();

                if ($object instanceof ComActivitiesActivityObjectInterface) {
                    $objects[$label] = $object;
                }
            }
        }

        return $objects;
    }
1167012
protected function _findActivityObject()
    {
        $db     = $this->getTable()->getAdapter();
        $table  = $this->_object_table;
        $column = $this->_object_column;

        $query = $this->getObject('lib:database.query.select');
        $query->columns('COUNT(*)')->table($table)->where($column . ' = :value')
              ->bind(array('value' => $this->row));

        // Need to catch exceptions here as table may not longer exist.
        try {
            $result = $db->select($query, KDatabase::FETCH_FIELD);
        } catch (Exception $e) {
            $result = 0;
        }

        return $result;
    }
422868
private function getObjectPropertiesValues($object)
    {
        $properties = Core::get()->getGettablePropertiesOfObject($object);
        $finalProperties = [];

        foreach ($properties as $property) {
            $finalProperties[$property] = Core::get()->getObjectService()->getObjectProperty($object, $property);
        }

        return $finalProperties;
    }
908168
public function extract($object)
    {
        return [
            'name' => $object->getFileName(),
            'type' => $object->getType(),
            'size' => $object->getSize(),
            'tmp_name' => $object->getTempName(),
            'error' => $object->getError(),
            'size' => [
                0 => $object->getWidth(),
                1 => $object->getHeight(),
                2 => $object->getMimeType(),
            ],
        ];
    }
823785
public static function get($object)
    {
        $cid = MANAPHP_COROUTINE ? \Swoole\Coroutine::getuid() : -1;

        $oid = spl_object_id($object);
        if (!isset(self::$_contexts[$cid][$oid])) {
            if (!$context_class = $object->getContextClass()) {
                throw new Exception(['`:context` context class is not exists', 'context' => get_class($object) . 'Context']);
            }
            return self::$_contexts[$cid][$oid] = new $context_class;
        } else {
            return self::$_contexts[$cid][$oid];
        }
    }
962059
private function getObjectState($object)
    {
        $class = new \ReflectionClass($object);
        $visibility = \ReflectionProperty::IS_PRIVATE | \ReflectionProperty::IS_PROTECTED;
        $values = [];

        do {
            foreach ($class->getProperties($visibility) as $property) {
                $property->setAccessible(true);
                $values[$property->getName()] = $property->getValue($object);
            }

            $class = $class->getParentClass();
            $visibility = \ReflectionProperty::IS_PRIVATE;
        } while ($class);

        return get_object_vars($object) + $values;
    }
247901
public function serialize(DomainMessage $object)
    {
        return [
            'id' => $object->getId(),
            'playhead' => $object->getPlayhead(),
            'metadata' => $this->metadataSerializer->serialize($object->getMetadata()),
            'payload' => $this->payloadSerializer->serialize($object->getPayload()),
            'recordedOn' => $object->getRecordedOn()->toString()
        ];
    }
539087
private function getProcessedData($object = false)
    {
        $processor = new DataProcessor(
                $this->results(), $this->columnDef, $this->templates
        );

        return $processor->process($object);
    }
271480
public static function getSerializables($object)
    {
        $annotation = static::getAnnotation($object, Serializables::class);
        if(null !== $annotation)
        {
            return $annotation;
        }
        else
        {
            return null;
        }
    }
1101181
public function getInfo(Threaded $object)
    {
        foreach ($this->data as $key => $value) {
            if ($object === $value) {
                return $this->info[$key];
            }
        }
    }