yii\apidoc\models\Context::getType PHP Method

getType() public method

Returning TypeDoc for a type given
public getType ( string $type ) : null | yii\apidoc\models\ClassDoc | yii\apidoc\models\InterfaceDoc | yii\apidoc\models\TraitDoc
$type string
return null | yii\apidoc\models\ClassDoc | yii\apidoc\models\InterfaceDoc | yii\apidoc\models\TraitDoc
    public function getType($type)
    {
        $type = ltrim($type, '\\');
        if (isset($this->classes[$type])) {
            return $this->classes[$type];
        } elseif (isset($this->interfaces[$type])) {
            return $this->interfaces[$type];
        } elseif (isset($this->traits[$type])) {
            return $this->traits[$type];
        }
        return null;
    }