@param \Interpro\Core\Contracts\Taxonomy\Types\CType $type

@return \Interpro\Extractor\Contracts\Items\COwnItem COwnItem
183003
public function createCap(CType $type)
    {
        $type_name = $type->getName();

        if($type_name !== 'seo')
        {
            throw new SeoException('Создание заглушки типа '.$type_name.' в пакете seo не поддерживается!');
        }

        $value = $this->cap_value;

        $item = new CItem($type, $value, true);

        return $item;
    }
62155
public function withType($type)
    {
        $choices = [
            PriceInterface::TYPE_OWN,
            PriceInterface::TYPE_RENT,
        ];

        Assertion::choice($type, $choices);

        $instance = clone $this;

        $instance->type = $type;

        return $instance;
    }
909479
protected function getFulfillmentMethodsByType($type)
    {
        if (!$this->fulfillmentMethodsByType) {
            $this->loadFulfillmentMethods();
        }

        return $this->fulfillmentMethodsByType->get($type);
    }
1217310
public static function groupType($type)
    {
        if ($type == Teamspeak::GROUP_DBTYPE_TEMPLATE) {
            return "Template";
        }
        if ($type == Teamspeak::GROUP_DBTYPE_REGULAR) {
            return "Regular";
        }
        if ($type == Teamspeak::GROUP_DBTYPE_SERVERQUERY) {
            return "ServerQuery";
        }

        return "Unknown";
    }
325613
public function setType(Type $type)
    {
        if ($this->type !== $type) {
            $this->type = $type;
            $type->setItem($this);
        }

        return $this;
    }
779471
public function setObjectType($type)
    {
        if (!is_null($type)) {
            $type = (string) $type;
        }

        $this->objectType = $type;
        return $this;
    }
942562
public function create(CType $type, $value)
    {
        $family = $type->getFamily();

        $factory = $this->getFactory($family);

        $item = $factory->create($type, $value);

        return $item;
    }
50030
public function create(string $type) : ?Controller
    {
        if (\class_exists($type) === false) {
            return $this->fallthrough($type);
        }

        $ref = new \ReflectionClass($type);
        $ctor = $ref->getConstructor();
        if ($ctor === null || $ctor->getNumberOfParameters() === 0) {
            return new $type();
        }

        return $this->fallthrough($type);
    }
833973
public function setType(string $type = self::TYPE_HIDDEN): InputInterface
    {
        $this->type = $type;

        return $this;
    }
252232
public function findSiteByType($type) {
        $type = (int) $type;
        return \Functional\first($this->_getSiteList(), function (CM_Site_Abstract $site) use ($type) {
            return $site->getType() === $type;
        });
    }
863984
public function pluginInstanceFromType($type) {
    $plugin = NULL;

    try {
      $plugin = $this->getDefinition($type);
      $plugin = $this->createInstance($plugin['id']);
    }
    catch (\Exception $exception) {
      \Drupal::logger('acm_sku')->notice(t("Bundle @bundle doesn't appear to
        have an implementation, please check the plugin id on your implementation
        of the SKU plugin", ['@bundle' => $type]));
    } finally {
      return $plugin;
    }
  }
1237157
public function getTemplate($type)
    {
        if ($this->apiLumen) {
            $template = file_get_contents(__DIR__ . '/stubs/api/' . $type . '.stub');
        } else {
            $template = file_get_contents(__DIR__ . '/stubs/' . $type . '.stub');
        }

        if ($template === false) {
            $this->error('CRUD Template [' . $type  . '] not found.');
            die;
        }

       return $template;
    }
746358
public function getFactory(string $type): Closure
    {
        assert(isset($this->closures[$type]));
        return $this->closures[$type];
    }
293768
protected function getDoctrineColumnType($type)
	{
		$type = strtolower($type);

		switch ($type) {
			case 'biginteger':
				$type = 'bigint';
				break;
			case 'smallinteger':
				$type = 'smallint';
				break;
			case 'mediumtext':
			case 'longtext':
				$type = 'text';
				break;
		}

		return Type::getType($type);
	}
1314668
public function setType($type)
    {
        $this->type = (string)$type;
        $this->getDocBlock()->getTagCollection()->removeByName(Tag::TAG_VAR);

        $tag = Tag::createFromProperty($this);

        $this->getDocBlock()->addTag($tag);

        return $this;
    }
1113754
protected function getEntity($type)
    {
        $entity = isset($this->config[$type]['entity'])
                ? $this->config[$type]['entity']
                : '\Cv\Entity\\'. ucfirst(rtrim($type, 's'));
        
        if (is_string($entity)) {
            $this->config[$type]['entity'] = $entity = new $entity();
        }
        return $entity;
    }
1220019
public static function getLogger($type) {
        if (!isset(self::$Loggers[$type])) {
            self::$Loggers[$type] = self::createLogger($type);
        }
        return self::$Loggers[$type];
    }