GraphQL\Type\Definition\Type::tryInferName PHP Метод

tryInferName() защищенный Метод

protected tryInferName ( ) : null | string
Результат null | string
    protected function tryInferName()
    {
        if ($this->name) {
            return $this->name;
        }
        // If class is extended - infer name from className
        // QueryType -> Type
        // SomeOtherType -> SomeOther
        $tmp = new \ReflectionClass($this);
        $name = $tmp->getShortName();
        if ($tmp->getNamespaceName() !== __NAMESPACE__) {
            return preg_replace('~Type$~', '', $name);
        }
        return null;
    }