摘要: Purpose: To separate strategies and to enable fast switching between them. Also this pattern is a good alternative to inheritance (instead of having a 阅读全文
posted @ 2019-06-10 05:37 Victor!!!! 阅读(84) 评论(0) 推荐(0)
摘要: UTF-8 at PHP Level: Must use the mb_* functions (such as mb_strpos() and mb_strlen() ) whenever operate on Unicode string. For example you use substr( 阅读全文
posted @ 2019-06-10 05:36 Victor!!!! 阅读(190) 评论(0) 推荐(0)
摘要: Purpose: To implement a loosely coupled architecture in order to get better testable, maintainable and extendable code. Usage: DatabaseConfiguration g 阅读全文
posted @ 2019-06-08 08:06 Victor!!!! 阅读(142) 评论(0) 推荐(0)
摘要: add_action: add_action(string $tag, callable $function_to_add, int $priority = 10, int $accepted_args = 1) Actions are the hooks that launches at spec 阅读全文
posted @ 2019-06-06 13:44 Victor!!!! 阅读(145) 评论(0) 推荐(0)
摘要: In object oriented programming, SOLID is for five design principles inented to make software designs more understandable, flexible and maintainable. S 阅读全文
posted @ 2019-06-06 01:26 Victor!!!! 阅读(282) 评论(0) 推荐(0)
摘要: Service Container: https://laravel-china.org/articles/789/laravel-learning-notes-the-magic-of-the-service-container https://www.cnblogs.com/lyzg/p/618 阅读全文
posted @ 2019-05-13 10:44 Victor!!!! 阅读(69) 评论(0) 推荐(0)
摘要: <?php function getArrayValues ($data) { static $newArr = []; // New Array if (!is_array($data)) { $newArr[] = $data; } foreach($data as $value) { if(!is_array($... 阅读全文
posted @ 2019-05-13 10:43 Victor!!!! 阅读(170) 评论(0) 推荐(0)
摘要: Purpose: To dynamically add new functionality to class instance. Booking.php BookingDecorator.php DoubleRoomBooking.php ExtraBed.php WiFi.php Tests/De 阅读全文
posted @ 2019-05-10 18:00 Victor!!!! 阅读(161) 评论(0) 推荐(0)
摘要: Purpose: A Data Mapper, is a Data Access Layer that performs bidirectional transfer of data between a persistent data store (ofen a relational databas 阅读全文
posted @ 2019-05-09 17:37 Victor!!!! 阅读(219) 评论(0) 推荐(0)
摘要: Purpose: To treat a group of objects the same way as a single instance of the object. RenderableInterface.php Form.php InputElement.php TextElement.ph 阅读全文
posted @ 2019-05-09 14:47 Victor!!!! 阅读(253) 评论(0) 推荐(0)