@param string $fullName

@return int
173018
public function isReservedName(string $fullName): int
    {
        $temp = explode(' ', strtoupper($fullName));
        if (in_array($temp[0], array_keys($this->reservedNames))) {
            return 0;
        }

        return -1;
    }
1109283
public function output(string $filename = null): int
    {
        if (null !== $filename) {
            $this->sendHeaders($filename);
        }
        $input_bom = $this->getInputBOM();
        $this->document->rewind();
        $this->document->fseek(strlen($input_bom));
        echo $this->output_bom;

        return strlen($this->output_bom) + $this->document->fpassthru();
    }
929405
private function getFullNameBit($bit)
    {
        if (empty($this->full_name_bits)) {
            $full_name = $this->getFullName();

            if (empty($full_name)) {
                list($first_name, $last_name) = $this->getFirstAndLastNameFromEmail();

                if ($first_name && $last_name) {
                    $this->full_name_bits = (new HumanNameParser("$first_name $last_name"))->getArray();
                } else {
                    $this->full_name_bits = ['first' => $first_name];
                }
            } else {
                $this->full_name_bits = (new HumanNameParser($full_name))->getArray();
            }
        }

        return empty($this->full_name_bits[$bit]) ? '' : $this->full_name_bits[$bit];
    }
464419
public static function getFullMime($shortName)
        {
            return array_key_exists($shortName, self::$mimes) ? self::$mimes[$shortName] : $shortName;
        }
1068135
public function getShort($full)
    {
        if (strpos($full, '*') !== false) {
            return $this->schema_index[substr($full, 0, -2)] . '.*';
        }
        if (isset($this->schema[$full]['short'])) {
            return $this->schema[$full]['short'];
        }
        return $full;
    }
719333
public function getFullName()
    {
        $parentFullName = $this->parentForm ? $this->parentForm->getFullName() : null;
        $fullName = $parentFullName ? $parentFullName . '[' . $this->getName() . ']' : $this->getName();

        return $fullName;
    }
1202674
private function parseFullClassName($fullName)
    {
        $parts = explode("\\", $fullName);
        $name = array_pop($parts);
        $namespace = implode("\\", $parts);
        return [$name, $namespace];
    }
703008
protected function _getFullName()
    {
        if (empty($this->_properties['first_name']) || empty($this->_properties['last_name'])) {
            return null;
        }

        return sprintf('%s %s', $this->_properties['first_name'], $this->_properties['last_name']);
    }
457164
private function doGenerate(string $fullName, int $characterLimit, array $characters = [])
    {
        $balineseGenerator = new BalineseUsernameGenerator();
        if (-1 !== $balineseGenerator->isReservedName($fullName)) {
            $characters = array_merge($characters, $balineseGenerator->generate($fullName, $characterLimit));
        }

        $islamicGenerator = new IslamicUsernameGenerator();
        if (-1 !== $islamicGenerator->isReservedName($fullName)) {
            $characters = array_merge($characters, $islamicGenerator->generate($fullName, $characterLimit));
        }

        $westernGenerator = new WesternUsernameGenerator();
        if (-1 !== $westernGenerator->isReservedName($fullName)) {
            $characters = array_merge($characters, $westernGenerator->generate($fullName, $characterLimit));
        }

        $genericGenerator = new GenericUsernameGenerator();
        $characters = array_merge($characters, $genericGenerator->generate($fullName, $characterLimit));

        return $characters;
    }
1284535
public function getRelationTableForJoin($fullName) {
        if (!$this->tableName) {
            $class = $this->model;
            $this->tableName = $class::getTableName();
        }
        return "`" . $this->tableName . "` as  `" . ($this->tableAlias = str_replace('.', '_', $fullName)) . "`";
    }
1338781
private function _getFullClassname()
    {
        if( $this->_fullClassName )
            return $this->_fullClassName;

        $this->_fullClassName = get_called_class();

        if( strpos( $this->_fullClassName, '__CG__' ) !== false )
            $this->_fullClassName = substr( $this->_fullClassName, strpos( $this->_fullClassName, '__CG__' ) + 6 );

        return $this->_fullClassName;
    }
315055
public function getFullWidth() : int {
        $first = $this->getFullStart();
        $last = $this->getEndPosition();

        return $last - $first;
    }
43260
public function setNames($firstName, $lastName, $fullName)
    {
        $names = [0 => '', 1 => ''];
        if (!empty($fullName)) {
            $this->fullName = trim($fullName);
            $names = preg_split("/[\s]+/", $this->fullName, 2);
        }
        if (!empty($firstName)) {
            $this->firstName = trim($firstName);
            $names[0] = $this->firstName;
        } else if (!empty($names[0])) {
            $this->firstName = $names[0];
        } else {
            $this->firstName = 'User';
        }
        if (!empty($lastName)) {
            $this->lastName = trim($lastName);
            $names[1] = $this->lastName;
        } else if (!empty($names[1])) {
            $this->lastName = $names[1];
        } else {
            $this->lastName = $this->id;
        }
        if (empty($this->fullName)) {
            $this->fullName = "{$this->firstName} {$this->lastName}";
        }
    }
1312838
public static function getErrors($fullnames = false) {

		if(false === is_bool($fullnames)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type boolean, "%s" given', __METHOD__, gettype($fullnames)), E_USER_ERROR);
		}

		if(true === $fullnames) {
			return static :: $errors['full'];
		}

		return static :: $errors['short'];
	}
1066066
protected function split($fullName)
    {
        $names = explode(" ", trim($fullName), 2);

        $this->firstName = trim($names[0]);
        $this->lastName = trim($names[1]);
    }
738647
protected function getResourceInfo($fullPathName)
  {
    foreach ($this->resourceFilesInfo as $info)
    {
      if ($info['full_path_name']===$fullPathName)
      {
        return $info;
      }
    }

    $this->logError("Unknown resource file '%s'", $fullPathName);

    return null;
  }
225697
protected function get_user_fullname($userid) {
        global $DB;

        if (empty($userid)) {
            return false;
        }

        if (!empty($this->userfullnames[$userid])) {
            return $this->userfullnames[$userid];
        }

        // We already looked for the user and it does not exist.
        if ($this->userfullnames[$userid] === false) {
            return false;
        }

        // If we reach that point new users logs have been generated since the last users db query.
        list($usql, $uparams) = $DB->get_in_or_equal($userid);
        $sql = "SELECT id," . get_all_user_name_fields(true) . " FROM {user} WHERE id " . $usql;
        if (!$user = $DB->get_records_sql($sql, $uparams)) {
            return false;
        }

        $this->userfullnames[$userid] = fullname($user);
        return $this->userfullnames[$userid];
    }