2010-12-05 25 views
28

मैं निम्नलिखित,Netbeans PHP में मेरे कार्यों के लिए दस्तावेज़ कैसे जोड़ें?

/* 
* 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 नहीं मिला।

alt text

कैसे इस 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) { 

उत्तर

34

आप पहली पंक्ति में एक तारक * याद कर रहे हैं: प्रयास करें

/** 
* 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 
*/ 
+0

यह धन्यवाद मिला है। मैंने पैरामीटर नाम में थोड़ा बदलाव किया है पैरामीटर विवरण अब भी दिखा रहा है। :) – emaillenin

+0

कक्षाओं के लिए दिखाने के लिए विवरण प्राप्त करने का प्रयास करने वालों के लिए: 'नया myClass' टाइप करते समय कक्षा का विवरण कन्स्ट्रक्टर विधि से खींचा जाता है। तो जानकारी के साथ निर्माता (जैसा वर्ग के बाहर या इसके अलावा) के साथ निर्माता को दस्तावेज दें, आप संकेतों में दिखाना चाहते हैं। – teynon

+0

@Pekka 웃, मैंने netbeans 6.5.1 में किया लेकिन जावा विधि के लिए और माउस को विधि पर डालने पर और दस्तावेज़ पर क्लिक करने के लिए प्रलेखन पर क्लिक नहीं होता है। –

5

मुझे विश्वास है कि आपको टिप्पणी करने का तरीका शुरू करने का तरीका

है
/** 
* 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 
*/ 

अपनी टिप्पणी शुरू करने के लिए डबल तारांकन नोट करें। आप यह php documentor देख सकते हैं।

6

Netbeans यह पहचान करने के लिए के लिए आप 2 ** जरूरत टिप्पणियां खोलने पर:

होना चाहिए

/**   
*   
*/ 

न सिर्फ एक नियमित रूप से टिप्पणी

/* 
* 
*/ 

उदाहरण:

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

नेटबीन s स्वचालित रूप से समारोह नाम

@return वैकल्पिक है कहते हैं, लेकिन उपयोगी

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. 
*/ 

आप जोड़ सकते हैं कि कौन सा संस्करण, क्या पैकेज, क्या सबपैकेज, मानकों के प्रकार, यानी स्ट्रिंग, जोड़ने के मिश्रित, bool, और क्या के बाद से वापसी है

17

अतिरिक्त संकेत: Netbeans आप के लिए यह कर सकते हैं:

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

अब लिखें:

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

Tadaam:

/** 
* 
* @param type $var1 
* @param type $var2 
* @return type 
*/ 
public static function test($var1,$var2) { 
    return $array; 
} 
+1

धन्यवाद और संकेत के लिए +1' [प्रेस दर्ज करें] 'phpdoc स्वचालित रूप से उत्पन्न करने के लिए – Silvan