Ignore:
Timestamp:
Nov 30, 2013 7:30:44 PM (11 years ago)
Author:
anonymous
Message:

added public and private keywords to all properties and methods, changed old classname constructor function to construct, removed more ?> closing tags

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eli_branch/lib/Version.inc.php

    r396 r439  
    4040
    4141    // Configuration of this object.
    42     var $_params = array(
     42    private $_params = array(
    4343        'max_qty' => 100, // Never have more than this many versions of each record.
    4444        'min_qty' => 25, // Keep at least this many versions of each record.
     
    5454
    5555    // Auth_SQL object from which to access a current user_id.
    56     var $_auth;
     56    private $_auth;
    5757
    5858    /**
     
    6363     * @static
    6464     */
    65     static function &getInstance($auth_object)
     65    public static function &getInstance($auth_object)
    6666    {
    6767        static $instance = null;
     
    7979     * @param mixed  $auth_object  An Auth_SQL object.
    8080     */
    81     function Version($auth_object)
     81    public function __construct($auth_object)
    8282    {
    8383        $app =& App::getInstance();
     
    102102     * @since   26 Aug 2005 17:09:36
    103103     */
    104     function initDB($recreate_db=false)
     104    public function initDB($recreate_db=false)
    105105    {
    106106        $app =& App::getInstance();
     
    155155     * @param  array $params   Array of param keys and values to set.
    156156     */
    157     function setParam($params=null)
     157    public function setParam($params=null)
    158158    {
    159159        if (isset($params) && is_array($params)) {
     
    170170     * @return mixed               Configured parameter value.
    171171     */
    172     function getParam($param)
     172    public function getParam($param)
    173173    {
    174174        $app =& App::getInstance();
     
    192192     * @return int                  The id for the version (mysql last insert id).
    193193     */
    194     function create($record_table, $record_key, $record_val, $title='', $notes='')
     194    public function create($record_table, $record_key, $record_val, $title='', $notes='')
    195195    {
    196196        $app =& App::getInstance();
     
    253253     * @return int                  The id for the version (mysql last insert id).
    254254     */
    255     function restore($version_id)
     255    public function restore($version_id)
    256256    {
    257257        $app =& App::getInstance();
     
    314314     * @return mixed                Array of versions, or false if none.
    315315     */
    316     function deleteOld($record_table, $record_key, $record_val)
     316    public function deleteOld($record_table, $record_key, $record_val)
    317317    {
    318318        $db =& DB::getInstance();
     
    381381     * @return mixed                Array of versions, or false if none.
    382382     */
    383     function getList($record_table, $record_key, $record_val)
     383    public function getList($record_table, $record_key, $record_val)
    384384    {
    385385        $db =& DB::getInstance();
     
    418418     * @return mixed                Array of data saved in version, or false if none.
    419419     */
    420     function getVerson($version_id)
     420    public function getVerson($version_id)
    421421    {
    422422        $db =& DB::getInstance();
     
    439439     * @return mixed                Array of data saved in version, or false if none.
    440440     */
    441     function getData($version_id)
     441    public function getData($version_id)
    442442    {
    443443        $db =& DB::getInstance();
     
    465465     * @return mixed                Array of data saved in version, or false if none.
    466466     */
    467     function getCurrent($record_table, $record_key, $record_val)
     467    public function getCurrent($record_table, $record_key, $record_val)
    468468    {
    469469        $db =& DB::getInstance();
     
    484484
    485485} // End of class.
    486 ?>
Note: See TracChangeset for help on using the changeset viewer.