ClearOS Documentation

×

Warning

301 error for file:https://clearos.com/dokuwiki2/lib/exe/css.php?t=dokuwiki&tseed=82873f9c9a1f5784b951644363f20ef8

User Tools

Site Tools


Framework Coding Standards Documentation

Every source code page should start with the phpDoc page-level documentation block. For class files (libraries and controllers), a similar class-level documentation block is also required.

Header Documentation

@category

The category should be set to one of the following values:

  • Apps
  • Themes
  • Framework

@package

The package name should be set to the RPM base name. For example, the OpenVPN App has the package set to OpenVPN.

@subpackage

The subpackage should be set to one of the following:

  • Libraries
  • Views
  • Controllers
  • Tests

@author

Multiple author lines can exist for a particular source code, ClearOS is open source after all! The author tag should be in the following format:

Full Name 

The copyright notice for the source code. Multiple copyright lines can be listed here.

@license

The license for source code.

A relevant web link.

Spacing and Alignment

The right hand value of the tags must all align. See code sample below.

Code Sample

/**
 * Daemon class.
 *
 * A meta file is used to organize and manage the daemons on the system.
 * In an ideal world, we would be able to scan the list of init scripts in
 * /etc/rc.d and generate the service list on the fly.  Unfortunately
 * there are some inconsistencies that make this impossible.  The meta file
 * holds the following information:
 *
 *  - the RPM where the daemon lives
 *  - the daemon/process name (what you see with ps)
 *  - whether or not the daemon supports a "/etc/rc.d/init.d/ reload"
 *  - a short title (eg Apache Web Server)
 *
 * @category   Apps
 * @package    Base
 * @subpackage Libraries
 * @author     ClearFoundation 
 * @copyright  2006-2011 ClearFoundation
 * @license    http://www.gnu.org/copyleft/lgpl.html GNU Lesser General Public License version 3 or later
 * @link       http://www.clearfoundation.com/docs/developer/apps/base/
 */
content/en_us/dev_framework_coding_standards_documentation.txt · Last modified: 2014/12/23 14:40 by dloper

https://clearos.com/dokuwiki2/lib/exe/indexer.php?id=content%3Aen_us%3Adev_framework_coding_standards_documentation&1558513025