0

多くのモジュールとコードが存在する CodeIgniter プロジェクトがあります。

今度は、他の新しい同僚のためにドキュメントを作成したいと思います。

例えば

/**
 * inline tags demonstration
 *
 * This class generates bars using the main algorithm, which also 
 * works heavily with {@link foo()} to rule the world. If I want
 * to use the characters "{@link" in a docblock, I just use "{@}link."  If
 * I want the characters "{@*}" I use "{@}*}"
 *
 * @author ahobbit
 * @copyright middleearth.org XVII
 * @version 1.2.3
 */
class bar
{
    // beginning of docblock template area
    /**#@+
    * @access private
    * @var string
    */
    var $_var1 = 'hello';
    var $_var2 = 'my';
    var $_var3 = 'name';
    var $_var4 = 'is';
    var $_var5 = 'Bob';
    var $_var6 = 'and';
    var $_var7 = 'I';
    /**
    * Two words
    */
    var $_var8 = 'like strings';
    /**#@-*/
    var $publicvar = 'Lookee me!';
}

/**
 * Makes chocolate bars
 *
 * There are two aspects to this class.
 * {@inheritdoc }  In addition, the foo class
 * makes the bars chocolate
 */
class foo extends bar
{

    /**
    * Check if a Sql row exists. (with two values)
    *
    * This function will check if a selected sql row exists that contains two
    * known values.
    *
    * @param  string  $tblname  Sql Table Name
    * @param  string  $colname  Sql Column Name 1
    * @param  string  $value    Sql value 1
    * @param  string  $colname2 Sql Column Name 2
    * @param  string  $value2   Sql value 2
    * @return boolean           returns true if the sql row does exist
    */
    function tableHasRow2D($tblname, $colname, $value, $colname2, $value2) { 
        $row = sqlQuery("SELECT COUNT(*) AS count FROM $tblname WHERE " . "$colname 
            LIKE '$value' AND $colname2 LIKE '$value2'"); 
        return $row['count'] ? true : false; 
    } 
}

次のコマンドで利用しました

I. PHPdoc

E:\xampp\htdocs\CI_Proj> php phpDocumentor.phar -d application

PHP Warning:  count(): Parameter must be an array or an object that implements Countable in phar://E:/xampp/htdocs/CI_Proj/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293
  Execute transformation using writer "twig"
  Execute transformation using writer "twig"
  Execute transformation using writer "twig"
  Execute transformation using writer "twig"
  Execute transformation using writer "twig"
  Execute transformation using writer "Graph"
Unable to find the `dot` command of the GraphViz package. Is GraphViz correctly installed and present in your path? 222.041s
Analyze results and write a report to log 

                       ..    0.004s

ここに画像の説明を入力


Ⅱ.アピジェン

E:\xampp\htdocs\CI_Proj\vendor\bin>apigen generate src "E:\xampp\htdocs\CI_Proj\application" --destination "E:\xampp\htdocs\CI_Proj\docs-apigen" --debug

Fatal error: Cannot use 'Object' as class name as it is reserved in E:\xampp\htdocs\CI_Proj\vendor\latte\latte\src\Latte\Object.php on line 14
ErrorException: Cannot use 'Object' as class name as it is reserved in E:\xampp\htdocs\CI_Proj\vendor\latte\latte\src\Latte\Object.php:14
Stack trace:
#0 [internal function]: Tracy\Debugger::shutdownHandler()
#1 {main}
Unable to log error: Logging directory is not specified.

コードの生成前または生成後にモジュールにコメントを追加することはできますか? ドキュメント自体の特定のモジュールにコメントを追加しようとしているので、必要に応じてソース コードの正しい位置に自動的に挿入されます。

プロジェクト内のモジュールとコードをどのように管理する必要がありますか? また、閲覧可能な HTML ドキュメントを作成するにはどうすればよいですか?

PHP ソース コードから直接ドキュメントを生成するその他のツール。

4

0 に答える 0