承接 emeraldinspirations/lib-createconstructcallable 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

emeraldinspirations/lib-createconstructcallable

Composer 安装命令:

composer require emeraldinspirations/lib-createconstructcallable

包简介

Returns an anonymous callable function referencing the constructor of a class

README 文档

README

emeraldinspirations logo

lib-createconstructcallable

A component of emeraldinspiration's library.

Returns an anonymous callable function referencing the constructor of a class

PHP does not yet have a syntax for creating a callable for the constructor of a class. Some workarounds involve using ReflectionClass. (See: https://stackoverflow.com/q/24129450/6699286)

This class provides an alternate option. It creates an anonymous function that fulfills the callable need and runs the relevant constructor.

Installing / Getting started

This project has no dependencies, so can simply be required with composer

composer require emeraldinspirations/lib-createconstructcallable

How to use

<?php

$Callable = ConstructCallableCreator::createConstructCallable(
    ExampleClass::class
);

$NewClass = $Callable($Param1, $Param2);
//Same result as new ExampleClass($Param1, $Param2)

Licensing

The code in this project is licensed under MIT license.

统计信息

  • 总下载量: 13
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-09-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固