32

私は次のことを試しました、

/*
 * addRelationship
 *
 * Adds a relationship between two entities using the given relation type.
 *
 * @param fromKey the original entity
 * @param toKey the referring entity
 * @param relationTypeDesc the type of relationship
 */

function addRelationship($fromKey, $toKey, $relationTypeDesc) {
    $relationTypeKey = $this->getRelationTypeKey($relationTypeDesc);

しかし、別の場所で使用しようとすると、PHPDocが見つかりませんと表示されます。

代替テキスト

これを NetBeans PHP で動作させる方法について何かアイデアはありますか?

アップデート :

以下は、NetBeans PHP で機能する更新された構文です。

/** 
 * addRelationship
 *
 * Adds a relationship between two entities using the given relation type.
 *
 * @param integer $fromKey the original entity
 * @param integet $toKey the referring entity
 * @param string $relationTypeDesc the type of relationship
 */

function addRelationship($fromKey, $toKey, $relationTypeDesc) {
4

5 に答える 5

40

最初の行にアスタリスクがありません*: 試してください

/**
 * addRelationship
 *
 * Adds a relationship between two entities using the given relation type.
 *
 * @param fromKey the original entity
 * @param toKey the referring entity
 * @param relationTypeDesc the type of relationship
 */
于 2010-12-05T20:14:27.583 に答える
20

追加のヒント: Netbeans はあなたのためにそれを作ることができます:

public static function test($var1,$var2) {
    return $array;
}

書いて :

/**[press enter]
public static function test($var1,$var2) {
    return $array;
}

忠岩 :

/**
 * 
 * @param type $var1
 * @param type $var2
 * @return type
 */
public static function test($var1,$var2) {
    return $array;
}
于 2014-11-14T10:21:20.373 に答える
6

Netbeansがそれを認識するために開くコメントには2**が必要です。

する必要があります

/**         
 *           
 */

通常のコメントだけではありません

/*
 *
 */

例:

/**
 * function description
 *
 * @param *vartype* ***param1*** *description*
 * @param int param2 this is param two  
 * @return void  
 */

Netbeansは関数名を自動的に追加します

@returnはオプションですが、便利です

于 2012-11-07T01:02:33.580 に答える
5

I believe the way to start you function comment is

/**
 * addRelationship
 *
 * Adds a relationship between two entities using the given relation type.
 *
 * @param fromKey the original entity
 * @param toKey the referring entity
 * @param relationTypeDesc the type of relationship
 */

Note the double asterisk to start your comment. You might want to check this php documentor.

于 2010-12-05T20:17:02.320 に答える
2
/**
 *
 * Adds a relationship between two entities using the given relation type.
 *
 * @since 2.1.1
 * @package coreapp
 * @subpackage entity
 * 
 * @param string $fromKey the original entity
 * @param mixed $toKey the referring entity
 * @param string relationTypeDesc the type of relationship
 * @return bool False if value was not updated and true if value was updated.
 */

どのバージョン、どのパッケージ、どのサブパッケージから、どのタイプのパラメーターを追加するか、つまり、string、mixed、bool、および戻り値を追加できます。

于 2013-04-23T03:05:39.777 に答える