pearweb
[ class tree: pearweb ] [ index: pearweb ] [ all elements ]

File: pear-database.php

Source Location: /pearweb-1.0.0RC1/include/pear-database.php

Classes:

category
Class to handle categories
package
Class to handle packages
maintainer
Class to handle maintainers
release
Class to handle releases
note
Class to handle notes
user
channel
statistics
PEAR_User
PEAR_Package
PEAR_Release

Page Details:

Includes:

require_once('DB/storage.php') [line 24]

logintest [line 3087]

void logintest( )



[ Top ]



make_utc_date [line 3205]

string make_utc_date( [int $ts = null], [string $format = 'Y-m-d H:i \U\T\C'])

Converts a Unix timestamp to a date() formatted string in the UTC time zone
  • Return: the time formatted time


Parameters

int   $ts   a Unix timestamp from the local machine. If none is provided the current time is used.
string   $format   a format string, as per http://php.net/date
[ Top ]



renumber_visitations [line 77]

void renumber_visitations( $id, [ $parent = null])

Some useful "visitation model" tricks:

To find the number of child elements: (right - left - 1) / 2

To find the number of child elements (including self): (right - left + 1) / 2

To get all child nodes:

SELECT * FROM table WHERE left > <self.left> AND left < <self.right>

To get all child nodes, including self:

SELECT * FROM table WHERE left BETWEEN <self.left> AND <self.right> "ORDER BY left" gives tree view

To get all leaf nodes:

SELECT * FROM table WHERE right-1 = left;



Parameters

   $id  
   $parent  
[ Top ]



validate [line 28]

void validate( $entity, $field, $value)



Parameters

   $entity  
   $field  
   $value  
[ Top ]



version_compare_firstelem [line 115]

void version_compare_firstelem( $a, $b)



Parameters

   $a  
   $b  
[ Top ]



Documentation generated on Tue, 24 Oct 2006 21:32:15 -0400 by phpDocumentor 1.3.0. PEAR Logo Copyright © PHP Group 2004.