SlideShare a Scribd company logo
PHPDocs @author Pablo Víquez < [email_address] >
Agenda Explanation of the require and most used tags Tips & Tricks Example
@package Specify package to group classes or functions and defines into. Usage: @package Navigation Generates a warning if not included 2 types: page-level package (defines, functions, includes/requires) class-level package (class, all its variables and methods)
@subpackage Specify sub-package to group classes or functions and defines into Usage @ subpackage Ca_Navigation IF @package is not found,  @subpackage is ignored
@var Document the data type of a class variable Usage @var <data_type> Must be a valid PHP datatype: bool, string, int,  mixed , array… Use for class data members
@author Author of the current element Can be use on anything Will try to parse the text inside <> as email Usage @author Pablo Viquez <pviquez@schematic.com>
@todo Document changes that will be made in the future Usage @todo One line explaining the todo
@ version  Version of the current document OSPG standard usage: @version $Id$ SVN on command line svn propset svn:keywords Id filename SVN config file: (~/.subversion/config) enable-auto-props = yes  [auto-props]  *.php = svn:keywords=Id  *.* = svn:keywords=Id
@see Display a link to the documentation for an element Usage: @see Navigation Display links ONLY for elements on the documentation, its not for links or external references The parser can be told where to look ::  -Which class to look in for the element. ie classname::$variablename. ()   -When present at the end of elementname, like elementname(), this tells the @see parser to search for a function or method. $   -When present at the beginning of elementname, like $elementname, this tells the @see parser to search for a variable in the current class.
@link Display a hyperlink to a URL in the documentation Usage @link http://www.schematic.com Might be use on any element
@abstract Document an abstract class, class variable or method Use the @abstract tag to declare a method, class variable, or class that must be re-defined in a child class to be valid. The @abstract tag  is only valid in PHP 4 , PHP 5 has a keyword abstract.
@access Access control for an element. Usage @access private|public @access private prevents documentation of the element unless specified by command-line It’s not require on PHP5 classes, since functions does have the keyword
@final Document a class method that should never be overridden in a child class. Usage: @final  [description] The @final tag  is only valid in PHP 4 , PHP 5 has a keyword final.
@example (1/2) Include an external example file with syntax highlighting Usage: @example <full_file_path_path |relative_file_path > Used to parse an example file for syntax highlighting and linking to documentation
Inline @example Really cool when you don’t want to include a file just display how to use it Usage: /**   * This function was created to show a PHP docs example   *    * You can also do usage examples as follow:    * <code>    * $ca_Navigation = Ca_Navigation();    * echo $ca_Navigation->aSimpleFunction(1,'Pablo');    * </code>    *    */
Tips & Tricks When generating the PHPDocs, always look for errors.html You can use some HTML elements in the documentation: <p>, <b>, <li>, <ol>, <ul>, <code>, <pre> IF for any reason you need to display <b> in the documentation, use double delimiter <<b>>  If you need to close a comment inside of the <code> tag use {@*}
Ad

Recommended

PHP 5
PHP 5
Rafael Corral
 
Functions and types of user defined functions in
Functions and types of user defined functions in
RAMYASREEKUPPALA
 
Object Oriented Programming with Laravel - Session 2
Object Oriented Programming with Laravel - Session 2
Shahrzad Peyman
 
Rail3 intro 29th_sep_surendran
Rail3 intro 29th_sep_surendran
SPRITLE SOFTWARE PRIVATE LIMIT ED
 
Mdst 3559-02-15-php
Mdst 3559-02-15-php
Rafael Alvarado
 
compiler ppt on symbol table
compiler ppt on symbol table
nadarmispapaulraj
 
Introduction to Eclipse
Introduction to Eclipse
Arpana Awasthi
 
Number series
Number series
Are Lavanya
 
Data localization and translation
Data localization and translation
Motti Danino
 
Number Series: How To Solve Questions with Short Tricks
Number Series: How To Solve Questions with Short Tricks
Entrance Exam Info
 
"Internationalisation with PHP and Intl" source code
"Internationalisation with PHP and Intl" source code
Daniel_Rhodes
 
Multi language for php with gettext
Multi language for php with gettext
Binh Quan Duc
 
Handling multibyte CSV files in PHP
Handling multibyte CSV files in PHP
Daniel_Rhodes
 
The Big Documentation Extravaganza
The Big Documentation Extravaganza
Stephan Schmidt
 
Problem Solving with Algorithms and Data Structures
Problem Solving with Algorithms and Data Structures
Yi-Lung Tsai
 
Grand Rapids PHP Meetup: Behavioral Driven Development with Behat
Grand Rapids PHP Meetup: Behavioral Driven Development with Behat
Ryan Weaver
 
People code events flowchart
People code events flowchart
Satish Ap
 
Internationalisation with PHP and Intl
Internationalisation with PHP and Intl
Daniel_Rhodes
 
Logical reasoning number series
Logical reasoning number series
Praveesh Palakeel
 
Computer Science Engineering : Data structure & algorithm, THE GATE ACADEMY
Computer Science Engineering : Data structure & algorithm, THE GATE ACADEMY
klirantga
 
Cmp104 lec 7 algorithm and flowcharts
Cmp104 lec 7 algorithm and flowcharts
kapil078
 
Data Structure & Algorithms | Computer Science
Data Structure & Algorithms | Computer Science
Transweb Global Inc
 
Basics of computer science
Basics of computer science
Paul Schmidt
 
RSA Algorithm
RSA Algorithm
West University of Timisoara
 
Computer Science & Information Systems
Computer Science & Information Systems
Luis Borges Gouveia
 
C Programming
C Programming
Rumman Ansari
 
Computer Science Engineering
Computer Science Engineering
ITM University, Raipur
 
Writing algorithms
Writing algorithms
Krishna Chaytaniah
 
JSP
JSP
Pratik Vipul
 
Declarative Development Using Annotations In PHP
Declarative Development Using Annotations In PHP
Stephan Schmidt
 

More Related Content

Viewers also liked (20)

Data localization and translation
Data localization and translation
Motti Danino
 
Number Series: How To Solve Questions with Short Tricks
Number Series: How To Solve Questions with Short Tricks
Entrance Exam Info
 
"Internationalisation with PHP and Intl" source code
"Internationalisation with PHP and Intl" source code
Daniel_Rhodes
 
Multi language for php with gettext
Multi language for php with gettext
Binh Quan Duc
 
Handling multibyte CSV files in PHP
Handling multibyte CSV files in PHP
Daniel_Rhodes
 
The Big Documentation Extravaganza
The Big Documentation Extravaganza
Stephan Schmidt
 
Problem Solving with Algorithms and Data Structures
Problem Solving with Algorithms and Data Structures
Yi-Lung Tsai
 
Grand Rapids PHP Meetup: Behavioral Driven Development with Behat
Grand Rapids PHP Meetup: Behavioral Driven Development with Behat
Ryan Weaver
 
People code events flowchart
People code events flowchart
Satish Ap
 
Internationalisation with PHP and Intl
Internationalisation with PHP and Intl
Daniel_Rhodes
 
Logical reasoning number series
Logical reasoning number series
Praveesh Palakeel
 
Computer Science Engineering : Data structure & algorithm, THE GATE ACADEMY
Computer Science Engineering : Data structure & algorithm, THE GATE ACADEMY
klirantga
 
Cmp104 lec 7 algorithm and flowcharts
Cmp104 lec 7 algorithm and flowcharts
kapil078
 
Data Structure & Algorithms | Computer Science
Data Structure & Algorithms | Computer Science
Transweb Global Inc
 
Basics of computer science
Basics of computer science
Paul Schmidt
 
RSA Algorithm
RSA Algorithm
West University of Timisoara
 
Computer Science & Information Systems
Computer Science & Information Systems
Luis Borges Gouveia
 
C Programming
C Programming
Rumman Ansari
 
Computer Science Engineering
Computer Science Engineering
ITM University, Raipur
 
Writing algorithms
Writing algorithms
Krishna Chaytaniah
 
Data localization and translation
Data localization and translation
Motti Danino
 
Number Series: How To Solve Questions with Short Tricks
Number Series: How To Solve Questions with Short Tricks
Entrance Exam Info
 
"Internationalisation with PHP and Intl" source code
"Internationalisation with PHP and Intl" source code
Daniel_Rhodes
 
Multi language for php with gettext
Multi language for php with gettext
Binh Quan Duc
 
Handling multibyte CSV files in PHP
Handling multibyte CSV files in PHP
Daniel_Rhodes
 
The Big Documentation Extravaganza
The Big Documentation Extravaganza
Stephan Schmidt
 
Problem Solving with Algorithms and Data Structures
Problem Solving with Algorithms and Data Structures
Yi-Lung Tsai
 
Grand Rapids PHP Meetup: Behavioral Driven Development with Behat
Grand Rapids PHP Meetup: Behavioral Driven Development with Behat
Ryan Weaver
 
People code events flowchart
People code events flowchart
Satish Ap
 
Internationalisation with PHP and Intl
Internationalisation with PHP and Intl
Daniel_Rhodes
 
Logical reasoning number series
Logical reasoning number series
Praveesh Palakeel
 
Computer Science Engineering : Data structure & algorithm, THE GATE ACADEMY
Computer Science Engineering : Data structure & algorithm, THE GATE ACADEMY
klirantga
 
Cmp104 lec 7 algorithm and flowcharts
Cmp104 lec 7 algorithm and flowcharts
kapil078
 
Data Structure & Algorithms | Computer Science
Data Structure & Algorithms | Computer Science
Transweb Global Inc
 
Basics of computer science
Basics of computer science
Paul Schmidt
 
Computer Science & Information Systems
Computer Science & Information Systems
Luis Borges Gouveia
 

Similar to Php Docs (20)

JSP
JSP
Pratik Vipul
 
Declarative Development Using Annotations In PHP
Declarative Development Using Annotations In PHP
Stephan Schmidt
 
Declarative Development Using Annotations In PHP
Declarative Development Using Annotations In PHP
stubbles
 
Jsp , javasportal, jsp basic,
Jsp , javasportal, jsp basic,
rupendra1817
 
course slides -- powerpoint
course slides -- powerpoint
webhostingguy
 
object oriented programming in PHP & Functions
object oriented programming in PHP & Functions
BackiyalakshmiVenkat
 
Php File Operations
Php File Operations
mussawir20
 
WordPress Structure and Best Practices
WordPress Structure and Best Practices
markparolisi
 
New Stuff In Php 5.3
New Stuff In Php 5.3
Chris Chubb
 
Html5 tutorial
Html5 tutorial
Ali Haydar(Raj)
 
Html5 tutorial
Html5 tutorial
Edress Oryakhail
 
Html5 tutorial
Html5 tutorial
Divyesh Bharadava
 
Html5 tutorial
Html5 tutorial
Arjuman Shaikh
 
Html5 tutorial
Html5 tutorial
Jitendra Gangwar
 
PHP
PHP
webhostingguy
 
Php
Php
TSUBHASHRI
 
Php
Php
TSUBHASHRI
 
Php
Php
TSUBHASHRI
 
Understanding information content with apache tika
Understanding information content with apache tika
Sutthipong Kuruhongsa
 
Understanding information content with apache tika
Understanding information content with apache tika
Sutthipong Kuruhongsa
 
Declarative Development Using Annotations In PHP
Declarative Development Using Annotations In PHP
Stephan Schmidt
 
Declarative Development Using Annotations In PHP
Declarative Development Using Annotations In PHP
stubbles
 
Jsp , javasportal, jsp basic,
Jsp , javasportal, jsp basic,
rupendra1817
 
course slides -- powerpoint
course slides -- powerpoint
webhostingguy
 
object oriented programming in PHP & Functions
object oriented programming in PHP & Functions
BackiyalakshmiVenkat
 
Php File Operations
Php File Operations
mussawir20
 
WordPress Structure and Best Practices
WordPress Structure and Best Practices
markparolisi
 
New Stuff In Php 5.3
New Stuff In Php 5.3
Chris Chubb
 
Understanding information content with apache tika
Understanding information content with apache tika
Sutthipong Kuruhongsa
 
Understanding information content with apache tika
Understanding information content with apache tika
Sutthipong Kuruhongsa
 
Ad

Recently uploaded (20)

Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
 
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
 
OWASP Barcelona 2025 Threat Model Library
OWASP Barcelona 2025 Threat Model Library
PetraVukmirovic
 
Data Validation and System Interoperability
Data Validation and System Interoperability
Safe Software
 
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC
 
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
Edge AI and Vision Alliance
 
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
Muhammad Rizwan Akram
 
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Safe Software
 
Enabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FME
Safe Software
 
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
Supporting the NextGen 911 Digital Transformation with FME
Supporting the NextGen 911 Digital Transformation with FME
Safe Software
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
Providing an OGC API Processes REST Interface for FME Flow
Providing an OGC API Processes REST Interface for FME Flow
Safe Software
 
June Patch Tuesday
June Patch Tuesday
Ivanti
 
Reducing Conflicts and Increasing Safety Along the Cycling Networks of East-F...
Reducing Conflicts and Increasing Safety Along the Cycling Networks of East-F...
Safe Software
 
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik
 
Down the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training Roadblocks
Rustici Software
 
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
Safe Software
 
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance
 
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
Safe Software
 
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
 
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
 
OWASP Barcelona 2025 Threat Model Library
OWASP Barcelona 2025 Threat Model Library
PetraVukmirovic
 
Data Validation and System Interoperability
Data Validation and System Interoperability
Safe Software
 
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC
 
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
Edge AI and Vision Alliance
 
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
Muhammad Rizwan Akram
 
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Safe Software
 
Enabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FME
Safe Software
 
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
Supporting the NextGen 911 Digital Transformation with FME
Supporting the NextGen 911 Digital Transformation with FME
Safe Software
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
Providing an OGC API Processes REST Interface for FME Flow
Providing an OGC API Processes REST Interface for FME Flow
Safe Software
 
June Patch Tuesday
June Patch Tuesday
Ivanti
 
Reducing Conflicts and Increasing Safety Along the Cycling Networks of East-F...
Reducing Conflicts and Increasing Safety Along the Cycling Networks of East-F...
Safe Software
 
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik
 
Down the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training Roadblocks
Rustici Software
 
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
Safe Software
 
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance
 
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
Safe Software
 
Ad

Php Docs

  • 1. PHPDocs @author Pablo Víquez < [email_address] >
  • 2. Agenda Explanation of the require and most used tags Tips & Tricks Example
  • 3. @package Specify package to group classes or functions and defines into. Usage: @package Navigation Generates a warning if not included 2 types: page-level package (defines, functions, includes/requires) class-level package (class, all its variables and methods)
  • 4. @subpackage Specify sub-package to group classes or functions and defines into Usage @ subpackage Ca_Navigation IF @package is not found, @subpackage is ignored
  • 5. @var Document the data type of a class variable Usage @var <data_type> Must be a valid PHP datatype: bool, string, int, mixed , array… Use for class data members
  • 6. @author Author of the current element Can be use on anything Will try to parse the text inside <> as email Usage @author Pablo Viquez <[email protected]>
  • 7. @todo Document changes that will be made in the future Usage @todo One line explaining the todo
  • 8. @ version Version of the current document OSPG standard usage: @version $Id$ SVN on command line svn propset svn:keywords Id filename SVN config file: (~/.subversion/config) enable-auto-props = yes [auto-props] *.php = svn:keywords=Id *.* = svn:keywords=Id
  • 9. @see Display a link to the documentation for an element Usage: @see Navigation Display links ONLY for elements on the documentation, its not for links or external references The parser can be told where to look :: -Which class to look in for the element. ie classname::$variablename. () -When present at the end of elementname, like elementname(), this tells the @see parser to search for a function or method. $ -When present at the beginning of elementname, like $elementname, this tells the @see parser to search for a variable in the current class.
  • 10. @link Display a hyperlink to a URL in the documentation Usage @link http://www.schematic.com Might be use on any element
  • 11. @abstract Document an abstract class, class variable or method Use the @abstract tag to declare a method, class variable, or class that must be re-defined in a child class to be valid. The @abstract tag is only valid in PHP 4 , PHP 5 has a keyword abstract.
  • 12. @access Access control for an element. Usage @access private|public @access private prevents documentation of the element unless specified by command-line It’s not require on PHP5 classes, since functions does have the keyword
  • 13. @final Document a class method that should never be overridden in a child class. Usage: @final [description] The @final tag is only valid in PHP 4 , PHP 5 has a keyword final.
  • 14. @example (1/2) Include an external example file with syntax highlighting Usage: @example <full_file_path_path |relative_file_path > Used to parse an example file for syntax highlighting and linking to documentation
  • 15. Inline @example Really cool when you don’t want to include a file just display how to use it Usage: /** * This function was created to show a PHP docs example * * You can also do usage examples as follow: * <code> * $ca_Navigation = Ca_Navigation(); * echo $ca_Navigation->aSimpleFunction(1,'Pablo'); * </code> * */
  • 16. Tips & Tricks When generating the PHPDocs, always look for errors.html You can use some HTML elements in the documentation: <p>, <b>, <li>, <ol>, <ul>, <code>, <pre> IF for any reason you need to display <b> in the documentation, use double delimiter <<b>> If you need to close a comment inside of the <code> tag use {@*}