PHP code example of gossi / docblock

1. Go to this page and download the library: Download gossi/docblock library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

gossi / docblock example snippets


use phpowermove\docblock\Docblock;

$docblock = new Docblock();

use phpowermove\docblock\Docblock;

$docblock = new Docblock('/**
 * Short Description.
 *
 * Long Description.
 *
 * @author gossi
 */');

use phpowermove\docblock\Docblock;

$docblock = new Docblock(new \ReflectionClass('MyClass'));

$tags = $docblock->getTags();

$tags = $docblock->getTags('author');

use phpowermove\docblock\tags\AuthorTag;

$author = new AuthorTag();
$author->setName('gossi');
$docblock->appendTag($author);

use phpowermove\docblock\tags\AuthorTag;

$docblock->appendTag(AuthorTag::create()
	->setName('gossi')
);

$docblock->hasTag('author');

$docblock->toString();

echo $docblock;