【问题标题】:Drupal via Eclipse for PHP - Errors in code documentationDrupal 通过 Eclipse for PHP - 代码文档中的错误
【发布时间】:2018-03-26 13:09:49
【问题描述】:

为了管理 Drupal 代码,我已经下载了 Eclipse for PHP Developers。为此,我按照this 页面上的描述更改了我的 Eclipse 设置,然后创建了一个新的 PHP 项目并引用了我的 localhost 网络服务器上现有的 Drupal 项目。 但是,现在我遇到了数千个错误,这些错误只发生在文档部分,就像我在下面复制的那样。 以下这些行的错误是:A 无法解析为类型(第 7 行和第 10 行)。我认为这与缺少类型提示有关,正如 here 所描述的那样。不过,我想知道如何处理这个问题,因为我尝试使用的代码只是导入的。同时,我想用 Eclipse 作为 IDE。

/**
 * Checks that the directory exists and is writable.
 *
 * Directories need to have execute permissions to be considered a directory by
 * FTP servers, etc.
 *
 * @param $directory A
 *          string reference containing the name of a directory path or URI. A
 *          trailing slash will be trimmed from a path.
 * @param $options A
 *          bitmask to indicate if the directory should be created if it does
 *          not exist (FILE_CREATE_DIRECTORY) or made writable if it is read-only
 *          (FILE_MODIFY_PERMISSIONS).
 *          
 * @return TRUE if the directory exists (or was created) and is writable. FALSE
 *         otherwise.
 */

【问题讨论】:

    标签: php eclipse drupal code-documentation


    【解决方案1】:

    我猜这只是 Eclipse 配置的问题。关于如何为 Drupal 开发配置 Eclipse,DO 上有一个巨大的逐步说明。

    https://www.drupal.org/docs/develop/development-tools/configuring-eclipse

    还有其他的。

    除此之外,我更愿意推荐 PHPStorm 用于 Drupal 开发。

    【讨论】:

    • 这些是我上面提到的 Eclipse 设置,谢谢。不过,感谢有关 PHPStorm 的提示。在this 指南的帮助下,设置我的 Drupal 项目相当容易。
    • @noai - 哦,我一定读多了。对不起!是的,PHPStorm 和 Drupal 是一个非常好的团队。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多