Ejemplo n.º 1
0
 public function actionTshirts()
 {
     $Tshirts = new Tshirts();
     $post = Yii::$app->request->post();
     $Tshirts->gender = $post['gender'];
     $Tshirts->plate = $post['plate'];
     $Tshirts->color = $post['color'];
     //图片的储存
     $Tshirts->save();
 }
Ejemplo n.º 2
0
<?php

header('Content-Type:text/html;charset=utf-8');
/*
 * 装饰模式【衣服搭配】
 * Author: Kaysen
 */
define('ROOT_PATH', dirname(__FILE__));
require_once ROOT_PATH . '/../../Loader.php';
$xiaocai = new Person('小菜');
echo '第一种装扮<br>';
$pqx = new Sneakers();
$kk = new Bigtrouser();
$dtx = new Tshirts();
$pqx->decorate($xiaocai);
$kk->decorate($pqx);
$dtx->decorate($kk);
$dtx->show();