将数组作为参数传递给Nelmio Alice夹具生成器

时间:2014-06-20 11:36:03

标签: php fixtures

我只是想知道是否有人知道如何使用Alice fixture生成器将空数组传递给方法

所以,如果我有一个像

这样的课程
class User
{
    private function __construct($name, array $images)
    {
        $this->name = $name;
        $this->images = $images
    }

    public static function create($name, array $images)
    {
        return self::create($name, $images);
    } 
}

我如何在爱丽丝中调用此功能?我尝试使用空数组括号,但它只识别为字符串

Namespace\Model\User:
  user{1..10}:
    __construct: { create: [ @identity<current()>, [] ] }

0 个答案:

没有答案