mijane Blog

ein paar interessante Sachen gibt es immer

Example for an php doc block

Geschrieben von Peter Rother • Samstag, 22. November 2008 • Kategorie: Doc Blocks

Here is an little example how you can create your php doc block. This example is copied from the mijane files and it's included to an svn client:

/**
* ### short desc ###
*
* ### long desc ###
*
* PHP 5 // should be php 5 ;-)
*
* @filesource $HeadURL$ // file path from svn
* @copyright Copyright (c) 2008, mijane // your copyright
* @link http://www.mijane.de // your website
* @package mijane_framework // package
* @sub-package core // subpackage
* @since 2008-11-21 // date of creation
* @version 0.0.1 // version like #.#.#
* @revision $Revision:$ // revision
* @author Peter Rother // author
* @modifiedby $Author$ // last committer
* @lastmodified $Date:$ // date
*/



Tags für diesen Artikel: ,
Tweet This!Tweet This!

0 Trackbacks

  1. Keine Trackbacks

5 Kommentare

Ansicht der Kommentare: (Linear | Verschachtelt)
  1. What about @param and @return? ;-)
  2. Why should we use @param and @return in the class doc block? I think we only required these in the method doc block.
  3. whoops, my bad, you're absolutely right :>
  4. Attention, @package got an invalid value in your example:

    Quote from
    http://manual.phpdoc.org/HTMLframesConverter/default/phpDocumentor/tutorial_tags.package.pkg.html:

    PACKAGES MUST BE ONE WORD WITH NO SPACES OR NEWLINES CONTAINING ONLY LETTERS, DIGITS, and "_", "-", "[" or "]"

    Also important for @subpackage, quote from
    http://manual.phpdoc.org/HTMLframesConverter/default/phpDocumentor/tutorial_tags.subpackage.pkg.html:

    If @package is not present in the same DocBlock, the @subpackage tag is ignored. A SUBPACKAGE NAME MUST BE ONE WORD WITH NO SPACES OR NEWLINES CONTAINING ONLY LETTERS, DIGITS, and "_", "-", "[" or "]"
  5. Hi Andreas,

    thanks for that hint. I'm sorry but i have overlook this in my example. It's adjusted now.

Kommentar schreiben


Umschließende Sterne heben ein Wort hervor (*wort*), per _wort_ kann ein Wort unterstrichen werden.
Standard-Text Smilies wie :-) und ;-) werden zu Bildern konvertiert.

Um maschinelle und automatische Übertragung von Spamkommentaren zu verhindern, bitte die Zeichenfolge im dargestellten Bild in der Eingabemaske eintragen. Nur wenn die Zeichenfolge richtig eingegeben wurde, kann der Kommentar angenommen werden. Bitte beachten Sie, dass Ihr Browser Cookies unterstützen muss um dieses Verfahren anzuwenden.
CAPTCHA