#3 docu documentation + fixes
This commit is contained in:
parent
915824c883
commit
9c71bd702f
@ -7,7 +7,7 @@
|
|||||||
* @copyright 2016 Ulf Gebhardt (http://www.webcraft-media.de)
|
* @copyright 2016 Ulf Gebhardt (http://www.webcraft-media.de)
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
||||||
* @link https://github.com/webcraftmedia/system
|
* @link https://github.com/webcraftmedia/system
|
||||||
* @package system_sql
|
* @package SYSTEM\SQL
|
||||||
*/
|
*/
|
||||||
namespace SYSTEM\SQL;
|
namespace SYSTEM\SQL;
|
||||||
|
|
||||||
|
|||||||
@ -1,21 +1,50 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* System - PHP Framework
|
||||||
|
*
|
||||||
|
* PHP Version 5.6
|
||||||
|
*
|
||||||
|
* @copyright 2016 Ulf Gebhardt (http://www.webcraft-media.de)
|
||||||
|
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
||||||
|
* @link https://github.com/webcraftmedia/system
|
||||||
|
* @package SYSTEM\DOCU
|
||||||
|
*/
|
||||||
namespace SYSTEM\DOCU;
|
namespace SYSTEM\DOCU;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Docu Class provided by System to register phpdocumentor configs.
|
||||||
|
*/
|
||||||
class docu {
|
class docu {
|
||||||
|
/** array Variable to store all registred phpdocconfigs */
|
||||||
private static $phpdocconfigs = array();
|
private static $phpdocconfigs = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register a phpdocconfig
|
||||||
|
*
|
||||||
|
* @param array $phpdocconfig Config to be registered
|
||||||
|
* @return null Returns null.
|
||||||
|
*/
|
||||||
public static function register($phpdocconfig){
|
public static function register($phpdocconfig){
|
||||||
array_push(self::$phpdocconfigs,$phpdocconfig);}
|
array_push(self::$phpdocconfigs,$phpdocconfig);}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get all registered phpdocconfigs
|
||||||
|
*
|
||||||
|
* @return array Returns array with all registered phpdocconfigs.
|
||||||
|
*/
|
||||||
public static function getAll(){
|
public static function getAll(){
|
||||||
return self::$phpdocconfigs;}
|
return self::$phpdocconfigs;}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a specific phpdocconfig by id
|
||||||
|
*
|
||||||
|
* @param string $id Phpdocconfig id to be found
|
||||||
|
* @return array Returns the specific config or throws an Error.
|
||||||
|
*/
|
||||||
public static function get($id){
|
public static function get($id){
|
||||||
foreach(self::$phpdocconfigs as $config){
|
foreach(self::$phpdocconfigs as $config){
|
||||||
if($config['id'] == $id){
|
if($config['id'] == $id){
|
||||||
return $config;}
|
return $config;}}
|
||||||
}
|
|
||||||
throw new ERROR('PhpDocConfig for id '.$id.' not found.');
|
throw new ERROR('PhpDocConfig for id '.$id.' not found.');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user