src/libs/APTitleCapitalizer.php
public function capitalize($string)
	{
		$string = $this->normalizeInput($string);
		$parts = $this->splitStringIntoParts($string);
		$parts = $this->processStringParts($parts);
		$parts = $this->processFirstSentenceWordsInParts($parts);
		$parts = $this->processLastWordInParts($parts);
		return $this->joinStringParts($parts);
	}
public function capitalize($string)
	{
		$string = $this->normalizeInput($string);
		$parts = $this->splitStringIntoParts($string);
		$parts = $this->processStringParts($parts);
		$parts = $this->processFirstSentenceWordsInParts($parts);
		$parts = $this->processLastWordInParts($parts);
		return $this->joinStringParts($parts);
	}
Capitalizes the given string, according to AP rules.

@param string $string

@return string