Enhanced boxes model documentation

This commit is contained in:
Raphaël Doursenaud 2014-08-21 12:39:17 +02:00
parent c3b30893fc
commit 2c1e892efe

View File

@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -25,25 +26,82 @@
/**
* Parent class of boxes
* Class ModeleBoxes
*
* Boxes parent class
*/
class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" boxes
{
var $db;
var $error='';
var $max=5;
var $enabled=1;
/**
* @var DoliDB Database handler
*/
public $db;
var $rowid;
var $id;
var $position;
var $box_order;
var $fk_user;
var $sourcefile;
var $class;
var $box_id;
var $note;
/**
* @var string Error message
*/
public $error = '';
/**
* @var int Maximum lines
*/
public $max = 5;
/**
* @var int Status
*/
public $enabled=1;
/**
* @var int Box definition database ID
*/
public $rowid;
/**
* @var int ID
* @deprecated Same as box_id?
*/
public $id;
/**
* @var int Position?
*/
public $position;
/**
* @var string Display order
*/
public $box_order;
/**
* @var int User ID
*/
public $fk_user;
/**
* @var string Source file
*/
public $sourcefile;
/**
* @var string Class name
*/
public $class;
/**
* @var string ID
*/
public $box_id;
/**
* @var string Alphanumeric ID
*/
public $boxcode;
/**
* @var string Note
*/
public $note;
/**
* Constructor
@ -71,6 +129,7 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty"
* Load a box line from its rowid
*
* @param int $rowid Row id to load
*
* @return int <0 if KO, >0 if OK
*/
function fetch($rowid)
@ -114,6 +173,7 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty"
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
*
* @return void
*/
function showBox($head, $contents)