上一页 1 2 3 4 5 6 ··· 11 下一页
摘要: 优势:松耦合,屏蔽组件。依赖分层 class ali { function buy(){ echo "买入阿里<br/>"; } function sell(){ echo "卖出阿里<br>"; } } class hds { function buy(){ echo "买入x德森<br/>"; 阅读全文
posted @ 2019-12-19 14:56 千载白云 阅读(488) 评论(0) 推荐(0) 编辑
摘要: 包装对象 扩展实例。 interface IComponent { function Display(); } class Person implements IComponent { private $name; function __construct($name){ $this->name = 阅读全文
posted @ 2019-12-19 13:54 千载白云 阅读(184) 评论(0) 推荐(0) 编辑
摘要: PHP 开启错误显示并设置错误报告级别 ini_set('error_reporting', E_ALL); ini_set('display_errors', 'on'); 目的:分级处理;整体与结构 树结构; <?php ini_set('error_reporting', E_ALL); in 阅读全文
posted @ 2019-12-18 20:11 千载白云 阅读(200) 评论(0) 推荐(0) 编辑
摘要: php抽象类和接口的区别 https://www.cnblogs.com/vinter/p/8716685.html 什么时候适合使用 多个角色配合工作:抽象角色对应具体角色; <?php interface icar{ function Run(); } class daben implement 阅读全文
posted @ 2019-12-18 13:44 千载白云 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 求字符串最大子串长度<?php class zif { public function sz($str) { $strsz = str_split($str); $zi = []; $len = []; foreach ($strsz as $val) { if (in_array($val, $z 阅读全文
posted @ 2019-12-08 16:08 千载白云 阅读(597) 评论(0) 推荐(0) 编辑
摘要: 1,目标;实现一个不同的类不同方法,符合一定的规范; 规范类 <?php interface Iplay{ function Attack(); function Defence(); } class qianfeng implements Iplay { function Attack() { e 阅读全文
posted @ 2019-12-08 15:28 千载白云 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 1,安装homestead :mac环境 https://learnku.com/docs/laravel-development-environment/5.5/development-environment-macos/937 问题:安装虚拟机mac高版本会报错,要去系统偏好里面设置安全与隐私, 阅读全文
posted @ 2019-12-06 11:42 千载白云 阅读(287) 评论(0) 推荐(0) 编辑
摘要: lumen-框架5.8为例 1,把vendor下的bin目录放到环境变量里面; 2,设置路由 $router->get('syn', ['uses' => 'syn\syn@dictionaryOptions',]); 3,在test目录下 ExampleTest文件里的 testExample方法 阅读全文
posted @ 2019-12-03 17:20 千载白云 阅读(587) 评论(0) 推荐(0) 编辑
摘要: 生成器模式 require "D:\\xxx\bild.php"; require "D:\\xxx\cx_bild.php"; require "D:\\xxx\jt_build.php"; class Director { public function build($build){ $buil 阅读全文
posted @ 2019-12-01 18:33 千载白云 阅读(258) 评论(0) 推荐(0) 编辑
摘要: <?php class sing { private static $instence = null; private function __construct() { } private function __clone() { } public static function getinsten 阅读全文
posted @ 2019-12-01 16:02 千载白云 阅读(117) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 11 下一页