Class PageLister_CountHandler

Description

Count handler for entries

Count handler for entries

Located in /PageLister_CountHandler.class.php (line 32)


	
			
Method Summary
int CountTotalEntries (string $query)
object DefaultHandler (string $handler)
boolean DefaultHandler_MySQL (resource $handler, array $args)
boolean DefaultHandler_MySQLi (resource $handler, array $args)
boolean SetArgs (array $args)
boolean SetHandler (string $function)
Methods
CountTotalEntries (line 191)

Returns the total amount of entries.

Returns the total amount of entries. After setting an handler, this method will count the total amount of entries for the given query.

  • access: public
int CountTotalEntries (string $query)
  • string $query
DefaultHandler (line 69)

Creates a default handler on-the-fly.

Creates a default handler on-the-fly. If you do not need a custom handler, you can use this static function to create a default handler. at the moment, MySQL and MySQLi is supported. If you need you own handler, you can use SetHandler(). You can pass additional arguments to every default handler. MySQL can have a link identifier, if you don't work with a single connection. For MySQLi, you have to deliver the resource of the MySQLi-object. So there are three options at the moment:

  1. $handler = PageLister::CountHandler('MySQL');
  2. $handler = PageLister::CountHandler('MySQL', $db);
  3. $handler = PageLister::CountHandler('MySQLi', $db);

  • static:
  • access: public
object DefaultHandler (string $handler)
  • string $handler
DefaultHandler_MySQL (line 134)

Default handler for MySQL.

Default handler for MySQL.

  • static:
  • access: public
boolean DefaultHandler_MySQL (resource $handler, array $args)
  • resource $handler
  • array $args
DefaultHandler_MySQLi (line 158)

Default handler for MySQLi.

Default handler for MySQLi.

  • static:
  • access: public
boolean DefaultHandler_MySQLi (resource $handler, array $args)
  • resource $handler
  • array $args
SetArgs (line 116)

Sets arguments for calling the count function If you add a custom handler, you may want to add custom args to the function, which you cant deliver as strings, such as resources. use this function by themself, so don't call it after creating a default handler.

Sets arguments for calling the count function If you add a custom handler, you may want to add custom args to the function, which you cant deliver as strings, such as resources. Default handlers will use this function by themself, so don't call it after creating a default handler.

  • access: public
boolean SetArgs (array $args)
  • array $args
SetHandler (line 94)

Sets a custom handler for counting.

Sets a custom handler for counting. You may want to use you own handler for the counting. You cann pass a function name, which should be called for this. PageLister_CountHandler will then call those function with one argument, the query.

  • access: public
boolean SetHandler (string $function)
  • string $function

Documentation generated on Thu, 12 Oct 2006 12:20:35 +0200 by phpDocumentor 1.3.0RC3