count_IDs (line
82)
Count categories
Count the number of categories by counting the number of templates in the template table of the database
integer
count_IDs
(integer $botid)
-
integer
$botid: the bot's ID, in case there are more than one bot.
getTemplateIDs (line
119)
Retrieve a predetermined number of templates
Retrieve a predetermined number of templates and their corresponding ID's from the templates table.
array
getTemplateIDs
(integer $botid, integer $pid, integer $templatesToProcess)
-
integer
$botid: The bot's ID, in case there are more than one bot.
-
integer
$templatesToProcess: Number of templates to process in a single processing cycle.
-
integer
$pid: Process ID, the process cycle (number of templates/templates to process) that is to be retrieved for processing
makeCategory (line
41)
Creating the AIML categories.
Creating the actual AIML categories from the Topic, Pattern, That and Template. At first this was done using DOM XML. However, it treated the AIML in the template as text and thus converted all the <srai> etc to their 'safe' characters
string
makeCategory
(string $cat_topic, string $cat_that, string $cat_pattern, string $cat_template)
-
string
$cat_topic: the contents of <topic name=''>
-
string
$cat_that: contents of <that>..</that>
-
string
$cat_pattern: contents of <pattern>..</pattern>
-
string
$cat_template: contents of the <template> including all of the AIML code.