PHP code example of waleedzahid106a / doc-reader
1. Go to this page and download the library: Download waleedzahid106a/doc-reader 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/ */
waleedzahid106a / doc-reader example snippets
yClass
{
/**
* @var0 1.5
* @var1 1
* @var2 "123"
* @var3 abc
* @var4 ["a", "b"]
* @var5 {"x": "y"}
* @var6 {"x": {"y": "z"}}
* @var7 {"x": {"y": ["z", "p"]}}
*
* @var8
* @var9 null
*
* @var10 true
* @var11 tRuE
* @var12 false
* @var13 null
*
*/
private function MyMethod()
{
}
};
$reader = new DocReader\Reader("MyClass", "MyMethod");
var_dump($reader->getParams());
yClass
{
/**
* @var x
* @var2 1024
* @param string x
* @param integer y
* @param array z
*/
private function MyMethod()
{
}
};
$reader = new DocReader\Reader("MyClass", "MyMethod");
var_dump($reader->getParams());
yClass
{
/**
* @get @post
* @ajax
* @postParam x @postParam y
* @postParam z
*/
private function MyMethod()
{
}
};
$reader = new DocReader\Reader("MyClass", "MyMethod");
var_dump($reader->getParams());
yClass
{
/**
* @param string var1
* @param integer var2
*/
private function MyMethod()
{
}
};
$reader = new DocReader\Reader("MyClass", "MyMethod");
var_dump($reader->getVarDeclarations("param"));