//男、女、不男不女
if(isset($_GET['sex'])){
$sex = $_GET['sex'];
}else{
$sex = 'Female';
}
$page = new Page();
$classstr = '\\com\\strategy\\'.$sex.'Strategy';
$page->setStrategy(new $classstr());
$page->index();
if(isset($_GET['sex'])){
$sex = $_GET['sex'];
}else{
$sex = 'Female';
}
$page = new Page();
$classstr = '\\com\\strategy\\'.$sex.'Strategy';
$page->setStrategy(new $classstr());
$page->index();
2016-02-20
推荐文章(下面的发错链接了)https://www.insp.top/article/learn-laravel-container。适合结合设计模式看
2016-01-28