Visit a stream type.

@param StreamType $type The type.

@return mixed The result of visitation.
552994
public function visitStreamType(StreamType $type)
    {
        $difference = $this->comparePrimaryType($type);

        if (0 !== $difference) {
            return $difference;
        }

        $difference =
            $this->compareAttribute($this->type->readable(), $type->readable());

        if (0 !== $difference) {
            return $difference;
        }

        return
            $this->compareAttribute($this->type->writable(), $type->writable());
    }
1205420
public static function getStackByType($type)
    {
        foreach (self::getStacks() as $stack) {
            if ($stack->isType($type)) {
                return $stack;
            }
        }
        return new Stacks\NullStack();
    }
888537
public function __cast(string $type)
    {
        if (!isset($this->__delegate)) {
            $this->__createDelegate();
        }

        return $this->__delegate->__cast($type);
    }
16365
public function nextval($type = null) {
		$result = $this->getByType('nextval');
		if (!empty($type)) {
			return $result[$type];
		}
		return $result;
	}
1113961
public function withType(string $type): self
    {
        $metadata = clone $this;
        $metadata->type = $type;

        return $metadata;
    }
1003946
protected function getLevel($type)
    {
        if (!isset($this->types[$type])) {
            throw new InvalidArgumentException('Invalid log type.');
        }

        return $this->types[$type];
    }
74906
public function transport($type = 'smtp')
    {
        if ($type == 'smtp') {
            return $this->getSmtpTransport();
        } elseif ($type == 'sendmail') {
            return $this->getSendMailTransport();
        }

        return $this->getMailTransport();
    }
940029
protected function getResultsByType($type)
    {
        $mapper = $this->relatedMapper->getManager()->mapper($type);

        $key = $mapper->getEntityMap()->getKeyName();

        $query = $mapper->getQuery();

        return $query->whereIn($key, array_keys($this->dictionary[$type]))->get();
    }
941740
protected static function getConnection($type) {
    $mapper = self::getMapper($type);
    $conn = $mapper->getConnection();
    return $conn;
  }
533768
public function type($type) {
        if (!array_key_exists($type, $this->orderedcollection)) {
            $this->orderedcollection[$type] = array();
        }
        return $this->orderedcollection[$type];
    }
728146
public function get($type)
    {
        if (isset($this->definitions[$type])) {
            return $this->definitions[$type];
        }

        throw new UnregisteredDefinitionException(
            $type,
            UnregisteredDefinitionException::TARGET_MIME_TYPE
        );
    }
1027078
public function getFollowedStreams($asccessToken, $streamType = 'live', $limit = 25, $offset = 0)
    {
        if (!$this->isValidStreamType($streamType)) {
            throw new InvalidStreamTypeException();
        }

        if (!$this->isValidLimit($limit)) {
            throw new InvalidLimitException();
        }

        if (!$this->isValidOffset($offset)) {
            throw new InvalidOffsetException();
        }

        $params = [
            'stream_type' => $streamType,
            'limit' => intval($limit),
            'offset' => intval($offset),
        ];

        return $this->get('streams/followed', $params, $asccessToken);
    }
30312
public function getProviderType(string $type): int
    {
        assert(isset($this->providerType[$type]));
        return $this->providerType[$type];
    }
1227816
public function get_chunks($type) {
        if (!isset($this->_chunks[$type]) || $this->_chunks[$type] === null)
            return null;

        $chunks = array ();

        foreach ($this->_chunks[$type] as $chunk) {
            if ($chunk['size'] > 0) {
                fseek($this->_fp, $chunk['offset'], SEEK_SET);
                $chunks[] = fread($this->_fp, $chunk['size']);
            } else {
                $chunks[] = '';
            }
        }

        return $chunks;
    }
1029683
public function getNextOfType($type)
    {
        for (; $this->idx < $this->count; ++$this->idx) {
            if ($this->tokens[$this->idx]->type === $type) {
                return $this->tokens[$this->idx++];
            }
        }

        return null;
    }
1321784
public function getType($type)
    {
        if (!$this->hasType($type)) {
            $this->metaTypeList[$type] = new $type();
        }

        return $this->metaTypeList[$type];
    }
1216735
public function type($type)
    {
        $types = is_array($type) ? $type : func_get_args();

        $this->types = array_merge($this->types, $types);

        return $this;
    }