You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@egooktafanda97 bit confused about the requested feature . are you asking about if we need pass a string rather than from file ? right now that functionality not present there but I think it's possible to achieve that using the tempfile method like
$file = tmpfile();
// here one can add the string content to temp file // fwrite($file, "writing to tempfile"); fseek($file, 0);
$filepath = stream_get_meta_data($file)["uri"];
// now that we have the file path with content written to it, we can use it for stub to class generation
StubGenerator::from($filepath, true) // the stub file path as full/absolute path, second param instruct to use it as fullPath
->to('some/path/to/store/generated/file') // the store directory path
->as('TheGeneratingFileNameItself') // the generatable file name without extension
->ext('php') // the file extension(optional, by default to php)// ->noExt() // to remove the extension from the file name for the generated file like .env
->withReplacers([]) // the stub replacing params
->save(); // save the filefclose($file); // better to destroy the resource once we are done .
Feature Description
What if the form is not a stub file but rather the syntax of a string that has been manipulated.
Is this feature valuable for other users as well and why?
may be
The text was updated successfully, but these errors were encountered: