-
-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Examples for Trait generator #24
Comments
$traitclass = new TraitGenerator();
$traitclass->addMethod('MethodOne');
$traitclass->addConstant('VERSION','1.0.0');
echo $traitclass->generate(); trait
{
public const VERSION = '1.0.0';
public function MethodOne()
{
}
}
@weierophinney You can close this issue as I am sharing code for the user. |
Is it part of the docs though? The original issue is indeed about expanding in the RST docs... |
@Ocramius I am thinking to contribute into doc but it was not original into doc so I am not sure about this. |
Perhaps adding a section to https://github.com/laminas/laminas-code/blob/ab0d54d8cb8b9ca1f6a8c3287e83724fbc61edbf/docs/book/generator/examples.md ? |
Adding example for issue laminas#24
I had requested traits back in zendframework/zendframework#4876 which is now closed. It appears this support was added via TraitGenerator. Would be great to see some examples included in the docs.
Originally posted by @RSully at zendframework/zend-code#73
The text was updated successfully, but these errors were encountered: