I am having problems in getting started with phpdoc. I created an example php file. This is the Code:
<?php
/**
* short comment
*/
/** This is the
* longer comment
*/
/**
* @author My Name <my.name@example.com>
*/
echo "Hello, World";
?>
As far as I understand this, I should now be able to make the documentation of this code with the following command:
phpdoc project:run -f C:\xampp\htdocs\libs\test.php -t C:\phpdoc\
the test.php file is the file I pasted here. C:\phpdoc\ is where the documentation should be placed. Now when I go there, several files and folders are generated, but when i open the "index.php" file and cklick on "Global ()" my window looks as the following:
[I would have placed an Image here, but my reputation is to low for that. I am trying to describe how it looks: It looks like a webpage with an invalid path to the css file. All Images and custom buttons are missing and the font is just the regular times new roman font. No background image and so on]
Why is that? What am I doing wrong?
BTW: I am using Windows 7 x64 and a new Version (also newly installed) of XAMPP
Best regards and many thanks for reading
I use apigen to do my php docblocks by I am going to surmise that phpdoc works the same. What you want to do is put all of those into a single block like so:
/**
* Short description, keep to one line.
*
* Long description, you can break this up
* over multiple lines.
*
* @author your.name@yourplace.com
* @param incoming The variable that is being sent in
* @return bool Type of variable to return and explanation of return value
*/
public function doStuff($incoming) {
//Do stuff here
return true;
}
You can place those above functions, variables, classes. Generally the first docblock you make for a file becomes the docblock for the entire file.