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 | |
class Controller_ModeA(){ | |
function getPost($key){ | |
return isset($_POST[$key])?$_POST[$key]:null; | |
} | |
private $validator; | |
function accept($validator){ | |
$this->validator = $validator; | |
$this->validator->visit($this); |
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 | |
class Controller_ModeA(){ | |
function getPost($key){ | |
return isset($_POST[$key])?$_POST[$key]:null; | |
} | |
private $validator; | |
function accept($validator){ | |
$this->validator = $validator; | |
$this->validator->visit($this); | |
} |
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 | |
class Config{ | |
const TITLE = 'わたしのほうむぺいじ☆'; | |
const URL = 'http://pc11.2ch.net/test/read.cgi/php/1222645553/'; | |
const DESCRIPTION = 'わたしのさいとのすてきな掲示板です☆ミ'; | |
const GENERATOR = '俺様の書いた最強RSSジェネレーター'; | |
/* | |
* RSSヘッダの画像ファイル名。 | |
*/ | |
const RSS_IMAGE = 'cat1.gif'; |
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 | |
function process($str, $ldelim, $rdelim){ | |
$begin = strpos($str, $ldelim); | |
$end = strpos($str, $rdelim, $begin + strlen($ldelim)); | |
if(false === $begin){ | |
return strtoupper($str); | |
} | |
if(false === $end){ | |
return strtoupper(substr($str, 0, $begin)) . $ldelim | |
. strtolower(substr($str, $begin + strlen($ldelim))); |