Zend\Code\Generator\FileGenerator::fromReflectedFileName
Use this if you intend on generating code generation objects based on the same file.
This will keep previous changes to the file in tact during the same PHP process
Signature
public function fromReflectedFileName(string
$filePath,
[bool
$includeIfNotAlreadyIncluded = true] )
Parameters
$filePath
— string$includeIfNotAlreadyIncluded
— object
Returns
- FileGenerator
Errors/Exceptions
-
InvalidArgumentException
- If file does not exists
-
RuntimeException
- If file exists but is not included or required