如何将 PHP_Beautifier 集成到 NuSphere PHPed IDE 中?
任何人都可以列出将 PHP_Beautifier 集成到 phped 中的步骤吗?
Can anyone list the steps to integrate PHP_Beautifier in phped.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您应该尝试此处的步骤。 这些是集成将代码返回到编辑器的任何脚本的一般步骤。
步骤 5 中的注意事项:
这应该被忽略,并且非常草率。 它类似于发布在此处的其他 PHPed 脚本的格式。
现在要了解如何实际使用 PHP_beautifier,请参考文档。
引用文档:
好的,所以我们需要给它一个文件,但我查看了主 Beautifier.php 文件,它似乎以某种方式接受 STDIN。 因此,让我们编写脚本:
将其保存为 PHP 文件,然后根据第一个链接的步骤 3 调用它。 我会安全地使用
@php5@
,因为 PHP_beautifier 可能需要它。我提前道歉,我不太确定 PHP_beautifier 如何处理 STDIN 输入。 我查看了代码,但无法确定。 另一种选择是始终先保存要清理的 PHP 文件,然后查看 phpED 文档以了解如何获取已打开和正在清理的 PHP 文件的路径。
如果我有更多时间查看 PHP_beautifier 包,我可以给出更明确的答案。
You should try the steps located here. These are general steps for integrating any script which returns code back to the editor.
Note in Step 5:
This should be ignored and is pretty sloppy. It'd be something like the format from other PHPed scripts posted here.
Now to see how to actually use PHP_beautifier, refer to the documentation.
To quote the documentation:
OK so we need to give it a file instead, but I've looked in the main Beautifier.php file and it seems to accept STDIN in some manner. So let's make the script:
So save this anywhere as a PHP file, and then call it according to Step 3 of the first link. I would be safe and use
@php5@
, as PHP_beautifier probably requires it.I apologize in advance, I'm not exactly certain how PHP_beautifier handles the STDIN input. I looked through the code but could not tell for certain. Another option is to always save the PHP file you're cleaning first, and then look through the phpED documentation for how to get the path to the PHP file you have open and are cleaning.
If I had more to time to look through the PHP_beautifier package I could give a more definite answer.
您可以使用 STDIN 和 STDOUT 作为输入或输出
You can use STDIN and STDOUT as input or output