Returns an array of datas from an array of objects

@param array $objects
@param string $classname
@return array
761410
public function getDatas($objects, &$classname = null) {
		$objects = \array_map ( function ($o) use (&$classname) {
			return $this->cleanRestObject ( $o, $classname );
		}, $objects );
		return \array_values ( $objects );
	}
619597
public function deserialize(string $serialized, ClassName $className = null)
    {
        $objectsAsArray = $this->decodeJson($serialized);

        if ($className !== null) {
            return $this->setObjectForClass($className, $objectsAsArray);
        }

        return $this->setObject($objectsAsArray);
    }
311161
public function getByIds($classname, Array $ids)
    {
        $classname = $classname . '\Sync';
        $classnameArray = $classname . '\ArrayObject';
        $objects = new $classnameArray();
        $objects->append(new $classname(array('id' => $ids)));

        $response = $this->request(
            $this->buildUrl(new $classname(), null, '/sync_fetch_ids'), 'POST', $this->mapper->mapToStorage($objects)
        );
        return $this->mapper->mapFromStorage($response);
    }
683843
public function asObject(string $className, array $constructorArgs = []): QueryBuilderHandler
    {
        return $this->setFetchMode(PDO::FETCH_CLASS, $className, $constructorArgs);
    }
295554
private function serializeObject($object, string $className = null)
    {
        if (is_null($className)) {
            $index = array_search($object, $this->references, true);

            if ($index !== false) {
                $this->referencesUsed[] = $index;

                return ['@ref' => $index];
            }

            $this->references[] = $object;
        }

        $data = ['@type' => get_class($object)];

        $reflectionClass = new \ReflectionClass($className ? $className : $object);

        // parent class
        $parent = $reflectionClass->getParentClass();
        if ($parent) {
            $parentData = $this->serializeObject($object, $parent->getName());
            if (count($parentData) > 0) {
                $data = array_merge($data, $parentData);
            }
        }

        // current $object
        foreach ($reflectionClass->getProperties() as $property) {
            $property->setAccessible(true);
            $value = $property->getValue($object);
            $name = $property->getName();

            // for parent class, don't reserialize public & protected properties
            if (isset($data[$name])) {
                continue;
            }

            // optimization: only save value if not the default value
            $defaults = $reflectionClass->getDefaultProperties();
            if (array_key_exists($name, $defaults) && $defaults[$name] === $value) {
                continue;
            }

            $this->serializeValue($name, $value, $data);
        }

        // ugly hack for public undeclared properties and
        // for internal object like datetime that can't be accessed by reflection
        // @see http://news.php.net/php.internals/93826%20view%20original
        if (!$className) {
            foreach (get_object_vars($object) as $key => $value) {
                if (!isset($data[$key])) {
                    $this->serializeValue($key, $value, $data);
                }
            }
        }

        return $data;
    }
1248756
public function getSyncList($classname)
    {
        $classname = $classname . '\Sync';
        $response = $this->request($this->buildUrl(new $classname(), null, '/sync_list_ids'), 'GET');
        return $this->mapper->mapFromStorage($response);
    }
684235
public static function getClassName($className) {
    if (is_object($className)) $className = self::getClass($className);
    
    $c = $className;
    if (mb_strpos($className,'\\') !== FALSE) {
      $p = explode('\\',$className);
      $c = array_pop($p);
    }
    return $c;
  }
784244
protected function getFetchPaginationResult(array $objects, $pagination)
    {
        if ($pagination) {
            $totalRowCount = $this->db->fetchValue('SELECT FOUND_ROWS()');

            return [$objects, $totalRowCount];
        } else {
            return $objects;
        }
    }
849649
public function getClassByName($className)
    {
        $classMap = $this->getClassMap($this->splitClassName($className)) . "[\"__class\"]";
        $return = null;

        eval(
            "if (isset(\$this->indexedClasses$classMap)) {"
            . " \$return = \$this->indexedClasses$classMap;"
            . "}"
        );

        return $return;
    }
863537
public function getField(string $className): array
    {
        $joinsType = $this->types->getFilterGroupJoin($className);

        $joinsField = [
            'name' => 'joins',
            'description' => 'Optional joins to either filter the query or fetch related objects from DB in a single query',
            'type' => $joinsType,
        ];

        return $joinsField;
    }
58410
public static function getClassName($className)
    {
        if (is_object($className)) {
            $className = get_class($className);
        }
        $className = array_slice(explode('\\', $className), - 1);
        return $className[0];
    }
542313
function objectForClass( $className )
    {
        if ( !isset( $GLOBALS['eZModuleOperationClassObjectList'] ) )
        {
            $GLOBALS['eZModuleOperationClassObjectList'] = array();
        }
        if ( isset( $GLOBALS['eZModuleOperationClassObjectList'][$className] ) )
        {
            return $GLOBALS['eZModuleOperationClassObjectList'][$className];
        }

        return $GLOBALS['eZModuleOperationClassObjectList'][$className] = new $className();
    }
112987
public function getSearchableFieldsFor($className) {
		$sng = null;
		if (is_object($className)) {
			$sng = $className;
			$className = get_class($className);
		}
		
		if (!class_exists($className)) {
			return array();
		}

		$searchable = $this->buildSearchableFieldCache();
		$hierarchy = array_reverse(ClassInfo::ancestry($className));
		
		$fieldsToSearch = null;

		foreach ($hierarchy as $class) {
			if (isset($searchable[$class])) {
				$fieldsToSearch = $searchable[$class];
			}
		}

		if (!$sng) {
			$sng = singleton($className);
		}

		if (!$fieldsToSearch) {
			if($sng->hasMethod('getSolrSearchableFields')) {
				$fieldsToSearch = $sng->getSolrSearchableFields();
			} else {
				$fieldsToSearch = $sng->searchableFields();
			}
		}
		
		$sng->extend('updateSolrSearchableFields', $fieldsToSearch);
		return $fieldsToSearch;
	}
1023257
protected function getObjectProperties(array $objects): array
    {
        $objectProperties = [];
        /** @var ITypedObject[] $objects */
        foreach ($objects as $key => $object) {
            $objectProperties[$key] = $object->toArray();
        }

        return $objectProperties;
    }
681455
public function findInheritanceByClassname(string $className): array
    {
        if (isset(self::$inheritanceByClassnameMap[$className])) {
            return self::$inheritanceByClassnameMap[$className];
        }

        if (!isset(self::$classAstMap[$className])) {
            return self::$inheritanceByClassnameMap[$className] = [];
        }

        return self::$inheritanceByClassnameMap[$className] = AstHelper::findInheritances(
            self::$classAstMap[$className]
        );
    }
929766
private function getCustomSortingNames(string $className): array
    {
        $this->fillCache($className);

        return array_keys($this->customSortings[$className]);
    }
593587
public function getMetadataFor($className)
    {
        if (!$this->hasMetadataFor($className)) {
            $metadata = new ClassMetadata($className);
            $this->populateMetadata($metadata);
            $this->setMetadataFor($className, $metadata);
        }

        return $this->metadata[$className];
    }