Zizaco/factory-muff — pull request #5 by pete-otaqui (2013-05-15 08:46:28+00:00)
Title: Adding "call" attribute type

Hi, me again.

I actually have a need to run my own functions to generate factory attributes.

To that end I've suggested here a "call" attribute type, like so:

```
'call|makeSlug|string'
);
public static function makeSlug($string)
{
// ...
return $new_string;
}
}
```

As you can see, I've also added the ability to pass in other FactoryMuff generated things as a parameter to your static generator function.

The big "gotcha" with that is that if you use a "factory|Model" as the parameter to pass to your callable, you get the instance of the model rather than it's id, as you normally would.

Love to know what you think.

Pete