Get account name suffix

@author Tom Haskins-Vaughan <tom@harvestcloud.com>
@since  2012-05-21

@return string
978574
public static function getAccountNameSuffix($type_code)
    {
        switch ($type_code)
        {
            case Account::TYPE_ACCOUNTS_RECEIVABLE: return ' A/R';
            case Account::TYPE_ACCOUNTS_PAYABLE:    return ' A/P';
            case Account::TYPE_SALES:               return ' Sales';
            case Account::TYPE_BANK:                return ' Bank';

            default:

                throw new \Exception('Incorrect type_code: '.$type_code);
        }
    }
594496
public function getTokenName()
    {
        $session = \PHPSession::singleton();

        if ($session->hasAttribute(TokenStore::TOKEN_NAME)) {
            $name = $session->getAttribute(TokenStore::TOKEN_NAME);
        } else {
            $name = 'tao_' . substr(md5(microtime()), rand(0, 25), 7);
            $session->setAttribute(TokenStore::TOKEN_NAME, $name);
        }

        return $name;
    }
923029
public function getBoundedName() {
    if ($this->alias) {
      return $this->alias->getText();
    }
    else {
      return $this->name->lastChild()->getText();
    }
  }
1355751
public function prefix(): string
    {
        if ($this->App->Config->§specs['§is_network_wide'] && $this->Wp->is_multisite) {
            return $this->wp->base_prefix.$this->App->Config->©brand['©var'].'_';
        } else {
            return $this->wp->prefix.$this->App->Config->©brand['©var'].'_';
        }
    }
1051238
public static function name()
    {
        return sprintf(
            self::pickOne(array(
                '%1$s %2$s %3$s',
                '%2$s %3$s %4$s',
                '%2$s %3$s',
                '%2$s %3$s',
                '%2$s %3$s',
                '%2$s %3$s',
            )),
            self::prefix(),
            self::firstName(),
            self::lastName(),
            self::suffix()
        );
    }
480676
public function getCommonSurname(): string
    {
        $top_surname = $this->topSurnames(1, 0);
        
        return $top_surname
            ? implode(', ', array_keys(array_shift($top_surname)) ?? [])
            : '';
    }
858415
public function getFullName()
    {
        if (! $this->_getVar('user_name')) {
            $name = ltrim($this->_getVar('user_first_name') . ' ') .
                    ltrim($this->_getVar('user_surname_prefix') . ' ') .
                    $this->_getVar('user_last_name');

            if (! $name) {
                // Use obfuscated login name
                $name = $this->getLoginName();
                $name = substr($name, 0, 3) . str_repeat('*', max(5, strlen($name) - 2));
            }

            $this->_setVar('user_name', $name);

            // \MUtil_Echo::track($name);
        }

        return $this->_getVar('user_name');
    }
534449
public function getName()
    {
        $name = rtrim($this->path, '/');

        if (strstr($name, DIRECTORY_SEPARATOR)) {
            $name = substr($name, strrpos($name, DIRECTORY_SEPARATOR) + 1);
        }

        return trim($name);
    }
576697
protected function getName()
  {
    if($this->currObj instanceof Channel && $this->currObj->isSpacer())
    {
      return $this->currObj["channel_name"]->section("]", 1, 99)->toString();
    }
    elseif($this->currObj instanceof Client)
    {
      $before = array();
      $behind = array();

      foreach($this->currObj->memberOf() as $group)
      {
        if($group->getProperty("namemode") == TeamSpeak3::GROUP_NAMEMODE_BEFORE)
        {
          $before[] = "[" . $group["name"] . "]";
        }
        elseif($group->getProperty("namemode") == TeamSpeak3::GROUP_NAMEMODE_BEHIND)
        {
          $behind[] = "[" . $group["name"] . "]";
        }
      }

      return trim(implode("", $before) . " " . $this->currObj . " " . implode("", $behind));
    }

    return $this->currObj->toString();
  }
723300
protected function getIndexName()
    {
        $name = $this->prefixKey(self::INDEX_NAME);

        if ($this->isItemNameValid($name)) {
            return $name;
        }

        return false;
    }
760877
public function getIndexName(): string
    {
        $indexName = $this->searchClient->getIndexName();
        if ($this->indexNamePostfix !== '') {
            $indexName .= '-' . $this->indexNamePostfix;
        }

        return $indexName;
    }
70998
public function getExtendedName()
    {
        $type = $this->getType();

        if ($type) {
            $extendedName = $type->getName();
        } else {
            $extendedName = '';
        }

        $catTitle = $this->getCategoryTitle();
        if ($catTitle !== null) {
            $extendedName .= '-' . $this->getCategoryTitle();
        }

        $extendedName .= '-' . $this->getName();

        return $extendedName;
    }
919392
public function getSubName()
    {
        if (false !== $pos = strpos($this->name, '(')) {
            return trim(substr($this->name, $pos + 1, -1));
        }

        return '';
    }
73249
public function get_formatted_name() : string {
        $context = $this->get_handler()->get_configuration_context();
        return format_string($this->get('name'), true, ['context' => $context]);
    }
1209673
public function getExpForRefName()
    {
        $value = 'CONCAT(' . self::AS_REFERRAL . '.' . Cfg::E_CUSTOMER_A_FIRSTNAME . ", ' ', " .
            self::AS_REFERRAL . '.' . Cfg::E_CUSTOMER_A_LASTNAME . ')';
        $result = new \Praxigento\Core\App\Repo\Query\Expression($value);
        return $result;
    }
725849
public function getFilename()
	{
		if ($this->filename == null) {
			$this->requestHead();
		}
		if ($this->filename == null) {
			$filename = pathinfo($this->url)['basename'];
			if (pathinfo($filename, PATHINFO_EXTENSION) === '') {
				$ext = ExtensionGuesser::getInstance()->guess(explode(';', $this->getMimetype())[0]);
				if ($ext && $filename) {
					$filename .= '.' . $ext;
				}
			}
			$this->filename = $filename;
		}
		return $this->filename;
	}
816250
public function getName()
    {
        if (!isset($this->name)) {
            BrowserDetector::detect($this, $this->getUserAgent());
        }

        return $this->name;
    }