Popular channels

[Aporte] Plantilla para Class

Simple Plantilla de como armar un class en php

<?php

/**
 * Class className
 *
 * @author              name <email>
 * @copyright           Copyright (c) 2011 - All right reserved.
 * @license             license
 * @version             version number
 * @package             app name
 *
 */
class ClassName {

        
/**
         * Constructor
         */
        
public function __construct() {}

        
/**
         * Destructor
         */
        
public function __destruct() {}

        
/********************* PROPERTY ********************/

        /**
         * Description
         *
         * @access private
         * @var type $_private_property
         */
        
private $_private_property;

        
/**
         * Description
         *
         * @access protected
         * @var type
         */
        
protected $protected_property;
        
        
/**
         * Description
         *
         * @access public
         * @var type
         */
        
public $public_property;

        
/********************* PRIVATE *********************/

        /**
         * Method description
         *
         * @author              name <email>
         * @access              private
         * @param               type $parameter
         * @return              type
         */
        
private function privateMethod($parameter) {}
        
        
/********************* PROTECTED *********************/

        /**
         * Method description
         *
         * @author              name <email>
         * @access              protected
         * @param               type $parameter
         * @return              type
         */
        
protected function protectedMethod($parameter) {}

        
/********************* PUBLIC **********************/

        /**
         * Method description
         *
         * @author              name <email>
         * @access              public
         * @param               type $parameter
         * @return              type
         */
        
public function publicMethod($parameter) {}

}
?>


Espero que le sea de utilidad.

Suerte
0
0
0
0No comments yet