定制 phpixie/sylph 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

phpixie/sylph

Composer 安装命令:

composer require --dev phpixie/sylph

包简介

Stubber

README 文档

README

A simple and easy to use array to class stubber. Greatly improves the speed of writing class stubs. Here is a quick exxample:

    $this->sylph = new \PHPixie\Sylph();
    $flowers = 7; //Will use it in an anonymous method later on
    $fairy = $this->sylph->cast(array(
        'name' => 'Tinkerbell',
        'likes' => array(
            'flying'  => true,
            'dancing' => true
        ),
        'pick_flowers' => function($picked) use($flowers){
            return $picked + $flowers;
        },
        'friend' => $this->sylph->cast(array(
            'name' => 'Trixie'
        ))
    ));
    
    $this->assertEquals('Tinkerbell', $fairy->name);
    $this->assertEquals(true, $fairy->likes['flying']);
    $this->assertEquals(true, $fairy->likes['dancing']);
    $this->assertEquals(10, $fairy->pick_flowers(3));
    $this->assertEquals('Trixie', $fairy->friend->name); 

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD
  • 更新时间: 2013-04-30