yii\apidoc\renderers\BaseRenderer::resolveNamespace PHP Method

resolveNamespace() private method

private resolveNamespace ( BaseDoc | string $context ) : string
$context yii\apidoc\models\BaseDoc | string
return string
    private function resolveNamespace($context)
    {
        // TODO use phpdoc Context for this
        if ($context === null) {
            return '';
        }
        if ($context instanceof TypeDoc) {
            return $context->namespace;
        }
        if ($context->hasProperty('definedBy')) {
            $type = $this->apiContext->getType($context);
            if ($type !== null) {
                return $type->namespace;
            }
        }
        return '';
    }