@param string $type

@return ArrayCollection|null
332835
public function getTaxonomiesByType($type)
    {
        $taxonomies = new ArrayCollection();

        /** @var TermRelationships $relationship */
        foreach ($this->getTermRelationships() as $relationship) {
            if ($type === $relationship->getTaxonomy()->getTaxonomy()) {
                $taxonomies[] = $relationship->getTaxonomy();
            }
        }

        return ($taxonomies->count() == 0) ? null : $taxonomies;
    }
622676
public function getObjectsKeys($type = 'all')
	{
		$keys = null;

		if ($type == 'all')
		{
			$function = 'array_merge';
		}
		elseif ($type == 'common')
		{
			$function = 'array_intersect_key';
		}
		else
		{
			throw new \InvalidArgumentException("Unknown selection type: $type");
		}

		foreach ($this->objects as $object)
		{
			if (version_compare(PHP_VERSION, '5.4.0', '<'))
			{
				$objectVars = json_decode(json_encode($object->jsonSerialize()), true);
			}
			else
			{
				$objectVars = json_decode(json_encode($object), true);
			}

			$keys = ($keys === null) ? $objectVars : $function($keys, $objectVars);
		}

		return array_keys($keys);
	}
560057
private function getCollection(string $type, string $locale = null): FileCollection
	{
		if (!isset($this->files[$type][$locale])) {
			$this->files[$type][$locale] = new FileCollection($this->root);
		}
		return $this->files[$type][$locale];
	}
1194435
public function getAsseticCollection($type = null)
    {
        list($cssFiles, $jsFiles) = $this->getAssets();
        return $this->filterAssetArray(array(
            $this->createAsseticCollection($cssFiles),
            $this->createAsseticCollection($jsFiles)
        ), $type);
    }
1073689
public function type($type = null)
    {
        if (is_null($type)) {
            return $this->type;
        }

        $this->type = $type;

        return $this;
    }
296737
public function findOne($type = '')
    {
        $rows = $this->findAll($type)->asArray();

        return isset($rows[0]) ? $rows[0] : null;
    }
10107
public function get_present_plugins($type) {
        $this->load_present_plugins();
        if (isset($this->presentplugins[$type])) {
            return $this->presentplugins[$type];
        }
        return null;
    }
1049732
protected function getTypeById($typeId)
    {
        /** @var CollectionType $type */
        $type = $this->em->getRepository('SuluMediaBundle:CollectionType')->find($typeId);
        if (!$type) {
            throw new CollectionTypeNotFoundException('Collection Type with the ID ' . $typeId . ' not found');
        }

        return $type;
    }
977999
private function getCollection($type) {
        if ($this->collections[$type] === null) {
            try {
                $this->collections[$type] = $this->getMongoClient()->selectCollection(
                    $this->params['databaseName'],
                    $type
                );
            } catch (MongoException $e) {
                throw new DatabaseException('Could not select collection', 500, $e);
            }
        }

        return $this->collections[$type];
    }
1365225
protected function doLoadClassMetadata($type)
    {
        if (false === $this->classMetadataExists($type)) {
            return null;
        }

        $className = $this->getClassNameForType($type);
        return $this->mf->getMetadataFor($className);
    }
566649
private function search($itemName, $type = null)
    {
        if (null === $type) {
            $searchArray = $this->getItems();
        } elseif (self::TYPE_FILE == $type) {
            $searchArray = $this->getFiles();
        } else {
            $searchArray = $this->getFolders();
        }

        foreach ($searchArray as $id => $cloudItem) {
            if ($itemName === $cloudItem->getName()) {
                return $cloudItem;
            }
        }

        return null;
    }
129108
protected function getItem($key, $type)
	{
		if(array_key_exists($type, $this->storage) && array_key_exists($key, $this->storage[$type]))
		{
			return $this->storage[$type][$key];
		}

		return null;
	}
447306
private function getFromData($type, $key)
    {
        return $this->hasData($type, $key) ? $this->data[$type][$key] : null;
    }
959291
public function get($type)
    {
        if (!isset($this->instances[$type])) {
            $this->instances[$type] = $this->loadFile($type);
        }

        return $this->instances[$type];
    }
936729
private function getClass($type)
    {
        $collType = \SwaggerValidator\Common\CollectionType::getInstance();
        $class    = $collType->get($type);

        if (empty($class)) {
            $e = new \SwaggerValidator\Exception('Cannot retrieve the callable for this type : ' . $type);
            $e->setFile(__METHOD__);
            $e->setLine(__LINE__);
            throw $e;
        }

        return $class;
    }
462634
public static function getInject($type = null) {
        if ($type === null)
            return static::$inject;
        elseif (isset(static::$inject[$type]))
            return static::$inject[$type];

        return array();
    }
669864
public static function getResource(string $type)
    {
        if (isset(self::$resources[$type])) {
            return self::$resources[$type];
        }
        $class = '\\sdopx\\resource\\' . Utils::toCamel($type) . 'Resource';
        if (class_exists($class)) {
            self::$resources[$type] = new $class();
            return self::$resources[$type];
        }
        return null;
    }