设计模式 - 环境搭建

从功能划分为以下三种

  • 创造
  • 结构
  • 行为
环境构建
  • composer.json 配置如下
      {
          "name": "cloong/design-patterns-php",
          "description": "simple design patterns for php",
          "require": {
              "php": ">=7.0"
          },
          "require-dev": {
              "phpunit/phpunit": "^9"
          },
          "license": "MIT",
          "authors": [
              {
                  "name": "bianca.lk.alex",
                  "email": "bianca.lk.alex@outlook.com"
              }
          ],
          "minimum-stability": "stable",
          "autoload": {
              "psr-4": {
                  "Creational\\": "creational/",
                  "Structural\\": "structural/",
                  "Behavioral\\": "behavioral/"
              }
          },
          "autoload-dev": {
              "psr-4": {
                  "Tests\\": "tests/"
              }
          }
      }
  • 执行 composer install
  • 目录结构
      ├─behavioral
      ├─creational
      ├─structural
      ├─tests
      └─vendor
本作品采用《CC 协议》,转载必须注明作者和本文链接
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!