lib/Inflector/Inflections.php
public function irregular($singular, $plural){
		Utils::array_delete($this->uncountables, $singular);
		Utils::array_delete($this->uncountables, $plural);
		
		$singular_char = substr($singular, 0, 1);
		$singular_char_upcase = strtoupper(substr($singular, 0, 1));
		$singular_char_downcase = strtolower(substr($singular, 0, 1));
		$singular_word = substr($singular, 1);
		
		$plural_char = substr($plural, 0, 1);
		$plural_char_upcase = strtoupper(substr($plural, 0, 1));
		$plural_char_downcase = strtolower(substr($plural, 0, 1));
		$plural_word = substr($plural, 1);
		
		
		if(strtoupper(substr($singular, 0, 1)) == strtoupper(substr($plural, 0, 1))){
			$this->plural("/({$singular_char}){$singular_word}$/i", '$1' . $plural_word);
			$this->plural("/({$plural_char}){$plural_word}$/i", '$1' . $plural_word);
			$this->singular("/({$plural_char}){$plural_word}$/i", '$1' . $singular_word);
		}else{
			$this->plural("/{$singular_char_upcase}(?i){$singular_word}$/", $plural_char_upcase . $plural_word);
			$this->plural("/{$singular_char_downcase}(?i){$singular_word}$/", $plural_char_downcase . $plural_word);
			$this->plural("/{$plural_char_upcase}(?i){$plural_word}$/", $plural_char_upcase . $plural_word);
			$this->plural("/{$plural_char_downcase}(?i){$plural_word}$/", $plural_char_downcase . $plural_word);
			$this->singular("/{$plural_char_upcase}(?i){$plural_word}$/", $singular_char_upcase . $singular_word);
			$this->singular("/{$plural_char_downcase}(?i){$plural_word}$/", $singular_char_downcase . $singular_word);
		}
	}
public function irregular($singular, $plural){
		Utils::array_delete($this->uncountables, $singular);
		Utils::array_delete($this->uncountables, $plural);
		
		$singular_char = substr($singular, 0, 1);
		$singular_char_upcase = strtoupper(substr($singular, 0, 1));
		$singular_char_downcase = strtolower(substr($singular, 0, 1));
		$singular_word = substr($singular, 1);
		
		$plural_char = substr($plural, 0, 1);
		$plural_char_upcase = strtoupper(substr($plural, 0, 1));
		$plural_char_downcase = strtolower(substr($plural, 0, 1));
		$plural_word = substr($plural, 1);
		
		
		if(strtoupper(substr($singular, 0, 1)) == strtoupper(substr($plural, 0, 1))){
			$this->plural("/({$singular_char}){$singular_word}$/i", '$1' . $plural_word);
			$this->plural("/({$plural_char}){$plural_word}$/i", '$1' . $plural_word);
			$this->singular("/({$plural_char}){$plural_word}$/i", '$1' . $singular_word);
		}else{
			$this->plural("/{$singular_char_upcase}(?i){$singular_word}$/", $plural_char_upcase . $plural_word);
			$this->plural("/{$singular_char_downcase}(?i){$singular_word}$/", $plural_char_downcase . $plural_word);
			$this->plural("/{$plural_char_upcase}(?i){$plural_word}$/", $plural_char_upcase . $plural_word);
			$this->plural("/{$plural_char_downcase}(?i){$plural_word}$/", $plural_char_downcase . $plural_word);
			$this->singular("/{$plural_char_upcase}(?i){$plural_word}$/", $singular_char_upcase . $singular_word);
			$this->singular("/{$plural_char_downcase}(?i){$plural_word}$/", $singular_char_downcase . $singular_word);
		}
	}
public function irregular ( $ singular , $ plural ) { Utils :: array_delete ( $ this -> uncountables , $ singular ) ; Utils :: array_delete ( $ this -> uncountables , $ plural ) ; $ singular_char = substr ( $ singular , 0 , 1 ) ; $ singular_char_upcase = strtoupper ( substr ( $ singular , 0 , 1 ) ) ; $ singular_char_downcase = strtolower ( substr ( $ singular , 0 , 1 ) ) ; $ singular_word = substr ( $ singular , 1 ) ; $ plural_char = substr ( $ plural , 0 , 1 ) ; $ plural_char_upcase = strtoupper ( substr ( $ plural , 0 , 1 ) ) ; $ plural_char_downcase = strtolower ( substr ( $ plural , 0 , 1 ) ) ; $ plural_word = substr ( $ plural , 1 ) ; if ( strtoupper ( substr ( $ singular , 0 , 1 ) ) == strtoupper ( substr ( $ plural , 0 , 1 ) ) ) { $ this -> plural ( "/({$singular_char}){$singular_word}$/i" , '$1' . $ plural_word ) ; $ this -> plural ( "/({$plural_char}){$plural_word}$/i" , '$1' . $ plural_word ) ; $ this -> singular ( "/({$plural_char}){$plural_word}$/i" , '$1' . $ singular_word ) ; } else { $ this -> plural ( "/{$singular_char_upcase}(?i){$singular_word}$/" , $ plural_char_upcase . $ plural_word ) ; $ this -> plural ( "/{$singular_char_downcase}(?i){$singular_word}$/" , $ plural_char_downcase . $ plural_word ) ; $ this -> plural ( "/{$plural_char_upcase}(?i){$plural_word}$/" , $ plural_char_upcase . $ plural_word ) ; $ this -> plural ( "/{$plural_char_downcase}(?i){$plural_word}$/" , $ plural_char_downcase . $ plural_word ) ; $ this -> singular ( "/{$plural_char_upcase}(?i){$plural_word}$/" , $ singular_char_upcase . $ singular_word ) ; $ this -> singular ( "/{$plural_char_downcase}(?i){$plural_word}$/" , $ singular_char_downcase . $ singular_word ) ; } }
Specifies a new irregular that applies to both pluralization and singularization at the same time. This can only be used
for strings, not regular expressions. You simply pass the irregular in singular and plural form.

Examples:
irregular('octopus', 'octopi')
irregular('person', 'people')

@param string $singular
@param string $plural
@return void
@author Koen Punt
Specifies a new irregular that applies to both pluralization and singularization at the same time . This can only be used for strings not regular expressions . You simply pass the irregular in singular and plural form .