Get the most logical display name for the user.

@return string
510766
public function getDisplayNameAttribute()
    {
        if (! is_null($this->details->display_name)) {
            return $this->details->display_name;
        }

        if (! is_null($this->details->full_name)) {
            return $this->details->full_name;
        }

        return $this->email;
    }
618497
public function getDisplayName()
    {
        if ($this->name !== '') {
            $result = $this->name;
        } else {
            $result = '';
            $string = trim($this->handle, '_-');
            $segments = preg_split('/[_-]+/', $string);
            foreach ($segments as $segment) {
                if ($segment !== '') {
                    $len = mb_strlen($segment);
                    if ($len === 1) {
                        $segment = mb_strtoupper($segment);
                    } else {
                        $segment = mb_strtoupper(mb_substr($segment, 0, 1)) . mb_substr($segment, 1);
                    }
                    if ($result === '') {
                        $result = $segment;
                    } else {
                        $result .= ' ' . $segment;
                    }
                }
            }
            if ($result === '') {
                $result = $this->handle;
            }
        }

        return $result;
    }
1096112
public function displayName()
    {
        if (! empty($this->first_name) && ! empty($this->last_name)) {
            return $this->first_name.' '.$this->last_name;
        }

        if (! empty($this->first_name) && ! empty($this->last_initial)) {
            return $this->first_name.' '.$this->last_initial.'.';
        }

        return $this->id;
    }
921780
public function getUsername()
    {
        $info = $this->getUserInfo();
        $username = strstr($info, ':', true);

        return rawurldecode($username === false ? $info : $username);
    }
1266344
protected function getFullCommandName()
    {
        $name = $this->name;

        foreach( $this->getArguments() as $argument ) {
            $argumentName = $argument[ 0 ];
            $argumentValue = $this->input->getArgument($argumentName);

            if( strpos($this->name, '{'. $argumentName .'}') !== false ) {
                $name = str_replace('{'. $argumentName .'}', $argumentValue, $this->name);
            } else {
                $name .= ' '. $argumentValue;
            }
        }

        foreach( $this->getOptions() as $option ) {
            $key = $option[ 0 ];
            $name .= ' --'. $key .'='. $this->input->getOption( $key );
        }

        return $name;
    }
1273274
def getDisplayName( self ):
        "  "
        displayName = self.name
        if self.base:
            displayName += "( " + ", ".join( self.base ) + " )"
        return displayName
300257
public function getName()
    {
        if (!empty($this->nameSingular)) {
            return Piwik::translate($this->nameSingular);
        }

        return $this->nameSingular;
    }
700831
public function getIdentifiersName()
    {
        $name = $this->tableName . '[' . static::IDENTIFIERS . ']';

        if ($this->selectionMode == Config::SELECTION_MULTIPLE) {
            $name .= '[]';
        }

        return $name;
    }
656056
public function getName() {
		if ($this->_name === null) {
			$name = get_class($this);
			$pos = strrpos($name, '\\');
			if ($pos !== false) {
				$name = substr($name, $pos + 1);
			}
			if (preg_match('/^Twig([A-Za-z]+)Extension$/', $name, $matches)) {
				$name = $matches[1];
			}
			$this->_name = strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $name));
		}
		return $this->_name;
	}
858310
protected function getNameInput()
    {
        $name = trim($this->argument('name'));

        if (Str::endsWith($name, 'Extension')) {
            return $name;
        }

        return sprintf('%sExtension', $name);
    }
1316905
public function getShowTitle()
    {
        $user = $this->getSelectedUser();

        if ($user) {
            return sprintf($this->_('Show staff member %s'), $user->getLoginName());
        }

        return parent::getShowTitle();
    }
733506
def display_name(self):
        """"""
        if self.name:
            return self.name
        elif self.canonical_alias:
            return self.canonical_alias

        # Member display names without me
        members = [u.get_display_name(self) for u in self.get_joined_members() if
                   self.client.user_id != u.user_id]
        members.sort()

        if len(members) == 1:
            return members[0]
        elif len(members) == 2:
            return "{0} and {1}".format(members[0], members[1])
        elif len(members) > 2:
            return "{0} and {1} others".format(members[0], len(members) - 1)
        else:  # len(members) <= 0 or not an integer
            # TODO i18n
            return "Empty room"
490448
public static function name()
    {
        $format = static::$formats[array_rand(static::$formats)];

        $parts = array();
        foreach ($format['parts'] as $function) {
            $parts[] = call_user_func($function);
        }

        return vsprintf($format['format'], $parts);
    }
246743
public function getNameAndEmail() {
        $display = '';
        if ( isset($this->displayname) && strlen($this->displayname) > 0 ) {
            $display = $this->displayname;
        }
        if ( isset($this->email) && strlen($this->email) > 0 ) {
            if ( strlen($display) > 0 ) {
                $display .= ' ('.$this->email.')';
            } else {
                $display = $this->email;
            }
        }
        $display = trim($display);
        if ( strlen($display) < 1 ) return false;
        return $display;
    }
825448
public function getNamePlural()
    {
        if (!empty($this->namePlural)) {
            return Piwik::translate($this->namePlural);
        }

        return $this->getName();
    }
467640
public function getModelDisplayName()
    {
        $instance = $this->getModelInstance();
        $display = isset($instance->display) ? $instance->display : ucfirst($this->model);

        return $display;
    }
1042895
public function get_formatted_name($options = array()) {
        if ($this->id) {
            $context = $this->get_context();
            return format_string($this->name, true, array('context' => $context) + $options);
        } else {
            return get_string('top');
        }
    }