@since 0.1

@param string $type

@return DiffOp[]
551729
public function getTypeOperations( string $type ): array {
		return array_intersect_key(
			$this->getArrayCopy(),
			array_flip( $this->typePointers[$type] )
		);
	}
1251426
private static function getCoreBean(string $type): array
    {
        $collector = BootBeanCollector::getCollector();
        if (!isset($collector[$type])) {
            return [];
        }

        $coreBeans = [];
        /** @var array $bootBeans */
        $bootBeans = $collector[$type];
        foreach ($bootBeans as $beanName) {
            /* @var \Swoft\Core\BootBeanInterface $bootBean */
            $bootBean  = App::getBean($beanName);
            $beans     = $bootBean->beans();
            $coreBeans = ArrayHelper::merge($coreBeans, $beans);
        }

        return $coreBeans;
    }
859905
protected function getFunctions($type = null)
    {
        $funcs = \get_defined_functions();

        if ($type) {
            return $funcs[$type];
        } else {
            return \array_merge($funcs['internal'], $funcs['user']);
        }
    }
495850
public function getStatistics(string $type): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/enterprise/stats/:type', $type));
    }
250460
private function getTypeSuffix($type)
    {
        self::$TYP_MAPPING = array_merge(self::$TYP_COMPLEX_MAPPING, self::$TYP_SIMPLE_MAPPING);

        if ($type == '') {
            return '';
        }

        if (!isset(self::$TYP_MAPPING[$this->type])) {
            return '';
        }

        return self::$TYP_MAPPING[$this->type];
    }
1300602
private function getPaths($type)
    {
        $typeConfigs = $this->typePaths[$type];
        $paths = [];

        foreach ($typeConfigs as $typeConfig) {
            $paths[] = $typeConfig['path'];
        }

        return $paths;
    }
532261
protected function getFavourites(int $type): array
    {
        $items = [];

        $result = $this->controller->soap("ContentDirectory", "Browse", [
            "ObjectID"          =>  "R:0/{$type}",
            "BrowseFlag"        =>  "BrowseDirectChildren",
            "Filter"            =>  "*",
            "StartingIndex"     =>  0,
            "RequestedCount"    =>  100,
            "SortCriteria"      =>  "",
        ]);
        $parser = new XmlParser($result["Result"]);

        $tagName = ($type === self::STATIONS) ? "item" : "container";
        foreach ($parser->getTags($tagName) as $tag) {
            $name = $tag->getTag("title")->nodeValue;
            $uri = $tag->getTag("res")->nodeValue;
            $items[] = new Stream($uri, $name);
        }

        return $items;
    }
237337
public static function filter($sType): array
    {
        if (!isset(static::$aCache[$sType])) {

            $aComponents            = static::available();
            static::$aCache[$sType] = [];

            foreach ($aComponents as $oComponent) {
                if ($oComponent->type === $sType) {
                    static::$aCache[$sType][] = $oComponent;
                }
            }
        }

        return static::$aCache[$sType];
    }
985243
public function listExtensions($type)
    {
        $results = [];

        if ($this->items === null) {
            $this->loadExtensions();
        }

        if (isset($this->items[$type]) && is_array($this->items[$type])) {
            $results = $this->items[$type];
        }

        if ($this->transactionItems !== null && isset($this->transactionItems[$type])) {
            $results = array_merge($results, $this->transactionItems[$type]);
        }

        return $results;
    }
10745
protected function getPackages($type)
    {
        $packages = $this->packages->all();

        if (! is_null($type)) {
            $packages = $packages->where('type', $type);
        }

        $results = array();

        foreach ($packages->sortBy('basename') as $package) {
            $results[] = $this->getPackageInformation($package);
        }

        return array_filter($results);
    }
536293
public function find_all_of_type($type) {
        $nodes = $this->children->type($type);
        foreach ($this->children as &$node) {
            $childnodes = $node->find_all_of_type($type);
            $nodes = array_merge($nodes, $childnodes);
        }
        return $nodes;
    }
1150582
public function getUnits($type = null)
    {
        if (!isset($type)) {
            return $this->units;
        }

        $filtered = array();
        foreach ($this->units as $key => $value) {
            if (isset($value['type']) && $value['type'] === $type) {
                $filtered[$key] = $value;
            }
        }

        return $filtered;
    }
1170119
public function getChanges($type)
	{
		if ( ! isset($this->changes[$type]))
		{
			return null;
		}

		return $this->changes[$type];
	}
7555
public static function items($type)
	{
		if(!isset(self::$_items[$type]))
			self::loadItems($type);
		return self::$_items[$type];
	}
399705
public function to($type = 'array')
	{
		$rows = [];

		if ($this->rows && $this->count())
		{
			foreach ($this->rows as $row)
			{
				$method = 'to' . ucfirst($type);
				$rows[] = $row->$method();
			}
		}

		return $rows;
	}
103756
private function getAllowedRoles(string $type)
    {
        if (array_key_exists($type, $this->commandRoleMapping)) {
            return $this->commandRoleMapping[$type];
        }

        return [];
    }
178006
public function findComponentsByType($type)
    {
        $components = [];
        foreach ($this->components as $component) {
            if ($component->hasType($type)) {
                $components[] = $component;
            }
        }

        return $components;
    }