$string = 'Daenerys'; $stringWithSuffix = Strings::appendSuffix($string, ' Targaryen');
Daenerys Targaryen
public static function appendSuffix($string, $suffix = '') { if (is_null($string)) { return null; } return $string . $suffix; }
public function getClassName() { $class = Strings::underscoreToCamelCase($this->controller); if (Strings::endsWith($class, 'Controller')) { return $class; } return Strings::appendSuffix($class, 'Controller'); }