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

Class: category

Source Location: /pearweb-1.1.5/include/pear-database.php

Class Overview


Class to handle categories


Author(s):

Methods


Inherited Variables

Inherited Methods


Class Details

[line 138]
Class to handle categories


[ Top ]


Method Detail

add   [line 154]

mixed add( array $data)

Add new category

$data = array( 'name' => 'category name', 'desc' => 'category description', 'parent' => 'category parent id' );

  • Return: ID of the category or PEAR error object

Parameters:

array   $data     

[ Top ]

delete   [line 201]

void delete( integer $id)

Deletes a category

Parameters:

integer   $id     Cateogry ID

[ Top ]

getRecent   [line 285]

array getRecent( int $n, string $category)

Get list of recent releases for the given category

Parameters:

int   $n     Number of releases to return
string   $category     Name of the category

[ Top ]

isValid   [line 320]

boolean isValid( string $category)

Determines if the given category is valid
  • Access: public

Parameters:

string   $category     Name of the category

[ Top ]

listAll   [line 245]

array listAll( )

List all categories

[ Top ]

listPackages   [line 261]

array listPackages( string $category)

Return a list of packages in this category

Parameters:

string   $category     

[ Top ]

update   [line 188]

mixed update( integer $id, string $name, [string $desc = ''])

Updates a categories details
  • Return: True on success, pear_error otherwise

Parameters:

integer   $id     Category ID
string   $name     Category name
string   $desc     Category Description

[ Top ]


Documentation generated on Sat, 06 Jan 2007 00:32:37 -0500 by phpDocumentor 1.3.0. PEAR Logo Copyright © PHP Group 2004.