Get taxonomies.

@param bool $objects object or name.

@return array
518681
public static function get_taxonomies( $objects = false ) {
		if ( $objects ) {
			$output = 'objects';
		} else {
			$output = 'names';
		}

		return get_taxonomies( array(
			'public'   => true,
			'_builtin' => false,
		), $output );
	}
341926
public function getPropertyValuesArray($object)
    {
        $values = [];
        foreach ($this->entityPropertiesMetadata as $entityPropertyMetadata) {
            $v = $entityPropertyMetadata->getValue($object);
            if (is_object($v)) {
                switch (get_class($v)) {
                    case \DateTime::class:
                        $v = $v->getTimestamp();
                        break;
                }
            }
            $values[$entityPropertyMetadata->getPropertyName()] = $v;
        }

        return $values;
    }
858921
public function filter($filters)
    {
        $filtered = [];
        foreach ($this->objectArr as $obj) {
            $success = true;
            foreach ($filters as $prop => $value) {
                if ($obj->$prop !== $value) {
                    $success = false;
                    break;
                }
            }
            if ($success) {
                $filtered[] = $obj;
            }
        }
        return $filtered;
    }
971724
public function getTags($object)
    {
        $tags = $this->_collectTags($object);
        
        if (is_string($tags)) {
            $tags = array(
                $tags => $tags
            );
        } elseif (!is_array($tags)) {
            return array();
        }
        
        return $tags;
    }
1269532
public static function extractIdentifierInObjectList(array $identifiers, array &$objects)
    {
        $searchIds = [];

        foreach ($identifiers as $identifier) {
            if (\is_object($identifier)) {
                $objects[] = $identifier;

                continue;
            }
            $searchIds[] = $identifier;
        }

        return $searchIds;
    }
4917
public static function groupByType(array $objects)
    {
        $perType = [];
        foreach ($objects as $object) {
            $type = $object->getType();
            if (!isset($perType[$type])) {
                $perType[$type] = [];
            }
            $perType[$type][] = $object;
        }
        return $perType;
    }
295214
public function create(array $objects) {
        $requests = [];

        foreach ($objects as $object) {
            $requests[] = [
                'method' => 'cmdb.object.create',
                'params' => $object
            ];
        }

        $result = $this->api->batchRequest($requests);

        $objectIDs = [];

        foreach ($result as $object) {
            $objectIDs[] = $object['id'];
        }

        return $objectIDs;
    }
492286
public function addAll($objects)
	{
		if (is_a($objects, 'Closure')) {
			return $this->closures[] = $objects;
		}

		foreach ($objects as $object) {
			$this->add($object);
		}
	}
820793
public function getAllStations(bool $active=false)
    {
        $stationsPerService = [];
        foreach ($this->services as $var => $hourlyService) {
            $stationsPerService[$var] = $this->getStations($hourlyService, $active);
        }
        return $stationsPerService;
    }
536207
public function getTermIds($taxonomies)
    {
        $tags = [];
        foreach ($taxonomies as $voc => $terms) {
            $vocabulary_id = $this->vocabulary($voc);
            $exploded = is_array($terms) ? $terms : explode(',', $terms);

            foreach ($exploded as $term) {
                $result = $this->getTermId($term, $vocabulary_id);
                if ($result) {
                    $tags[] = $result;
                }
            }
        }

        return $tags;
    }
830590
public function getTables(bool $clear = false): array
    {
        if ($clear) {
            $this->tableList = null;
        }

        if ($this->tableList === null) {
            $compiler = $this->connection->schemaCompiler();

            $database = $this->getCurrentDatabase();

            $sql = $compiler->getTables($database);

            $results = $this->connection
                ->query($sql['sql'], $sql['params'])
                ->fetchNum()
                ->all();

            $this->tableList = [];

            foreach ($results as $result) {
                $this->tableList[strtolower($result[0])] = $result[0];
            }
        }

        return $this->tableList;
    }
407411
public function findByNames(array $names): array
    {
        $result = [];
        if (count($names) > 0) {
            $queryBuilder = $this->entityManager->createQueryBuilder();
            $queryBuilder->select('cc')
                         ->from(CraftingCategory::class, 'cc')
                         ->andWhere('cc.name IN (:names)')
                         ->setParameter('names', array_values($names));

            $result = $queryBuilder->getQuery()->getResult();
        }
        return $result;
    }
1079005
public static function getTypes($collection = false)
    {
        return array_merge($collection ? self::getCompoundTypes() : self::getSimpleTypes(), self::getEmptyTypes());
    }
423868
public function collect($object)
    {
        $result = array();
        $products = $object->getItems();
        foreach ($products as $product) {
            $result[] = $product;
        }
        return $result;
    }
1229060
public function getAll($relations = true)
    {
        $results = array_merge($this->data, [
            'fields' => $this->getFields(),
            'files' => $this->getFileFieldNames(),
            'json' => $this->getJsonFieldNames(),
            'listable' => $this->getListableFieldNames(),
            'detailable' => $this->getDetailableFieldNames(),
            'required' => $this->getRequiredFieldNames(),
            'slugable' => $this->getSlugableFieldNames(),
            'uuids' => $this->getUuidFieldNames(),
            'unique' => $this->getUniqueFieldNames()
        ]);

        return $results;
    }
170931
private function getClass($array, &$objects)
    {
        foreach ($array as $el) {
            if (is_object($el)) {
                $objects = $array;

                $class = get_class($el);
            } else {
                if (is_array($el)) {
                    $class = $this->getClass($el, $objects);
                }
            }
        }

        return $class;
    }
378499
public function getColumns($base = false)
    {
        //Get the table name
        $name = $base ? $this->getBase() : $this->getName();

        //Get the columns from the schema
        $columns = $this->getSchema($name)->columns;

        return $this->mapColumns($columns, true);
    }