Created
July 22, 2012 09:43
-
-
Save shakyShane/3159082 to your computer and use it in GitHub Desktop.
Convert a 'route' into a page title
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Convert a 'route' into a page title. | |
* | |
* @static | |
* @param $route | |
* @return string | |
* | |
*/ | |
public static function setTitle($route){ | |
$defaultTitle = 'Shane Osbourne - Web Developer'; | |
if ($route){ | |
$title = $route . ' - ' . $defaultTitle; | |
return $title; | |
} else | |
return $defaultTitle; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment