This file contains hidden or 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 | |
$spamChecker = new SpamChecker(); | |
$spamChecker->addRule(function($spam){ | |
if (strpos($spam, 'test') !== false) { | |
return true; | |
} | |
}); | |
echo "The following should be true" . PHP_EOL; | |
var_dump($spamChecker->isSpam('this is a test')); |
This file contains hidden or 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 | |
class Home_Router extends Router_Template | |
{ | |
public static function getViewRoutes() | |
{ | |
return array('/^home$/i' => 'Home_View'); | |
} | |
public static function getEditRoutes() | |
{ |