Returns the number of Subjects in the database
If $Alphabetical is set to true, an array will be returned with keys of a-z, #, and * each holding the count for Subject Subjects starting with that character. # represents all collections starting with a number, and * holds the total count of all collections.
integer|Array
countSubjects
([ $Alphabetical = false], $SubjectTypeID, boolean $Alphabetical[optional], integer $SubjectTypeID[optional])
-
boolean
$Alphabetical[optional]
-
integer
$SubjectTypeID[optional]
-
$Alphabetical
-
$SubjectTypeID
Creates an formatted string from an array of Subject objects
string
createStringFromSubjectArray
(Subject[] $arrSubjects, [ $Delimiter = ', '], [ $MakeIntoLink = LINK_NONE], [ $SubDelimiter = ' - '], string $Delimiter[optional], integer $MakeIntoLink[optional], string $SubDelimiter[optional])
-
Subject[]
$arrSubjects
-
string
$Delimiter[optional]
-
integer
$MakeIntoLink[optional]
-
string
$SubDelimiter[optional]
-
$Delimiter
-
$MakeIntoLink
-
$SubDelimiter
Retrieves all Subjects from the database
If $MakeIntoIndex is false, the returned array of Subject objects is sorted by Subject and has IDs as keys.
If $MakeIntoIndex is true, the returned array is a two dimensional array, with the first dimension indexed with
- (representing numeric characters) and the lowercase characters a-z.
Each of those arrays will contain a sorted set of Subject objects, with the Subject's IDs as keys.
Subject[]
getAllSubjects
([ $MakeIntoIndex = false], boolean $MakeIntoIndex[optional])
-
boolean
$MakeIntoIndex[optional]
-
$MakeIntoIndex
Retrieves all Subjects for a subject type from the database
The returned array of Subject objects is sorted by Subject and has IDs as keys.
Subject[]
getAllSubjectsForSubjectTypeID
( $SubjectTypeID)
Retrieves all Subject Sources from the database
The returned array of SubjectSource objects is sorted by SubjectSource and has IDs as keys.
SubjectSource[]
getAllSubjectSources
()
Retrieves all Subject Types from the database
The returned array of SubjectType objects is sorted by SubjectType and has IDs as keys.
SubjectType[]
getAllSubjectTypes
()
Retrieves child Subjects for Subject specified by $ID
Subject[]
getChildSubjects
(integer $ID, integer $SubjectTypeID)
-
integer
$ID
-
integer
$SubjectTypeID
Retrieves an array containing Subject objects for each ID in $arrIDs
Subject[]
getSubjectArrayFromIDArray
(integer[] $arrIDs)
Returns SubjectID value when passed the string value for a container type.
integer
getSubjectIDFromString
(string $String, integer $ParentID)
-
string
$String
-
integer
$ParentID
Retrieves an array of Subject objects that begin with the character specified by $Char
Subject[]
getSubjectsForChar
(string $Char, integer $SubjectTypeID)
-
string
$Char
-
integer
$SubjectTypeID
Returns SubjectSourceID value when passed the string value for a subject source.
integer
getSubjectSourceIDFromString
(string $String)
Returns SubjectTypeID value when passed the string value for a container type.
integer
getSubjectTypeIDFromString
(string $String)
Searches the Subject database
Creator[]
searchSubjects
(string $SearchQuery, [ $ParentID = NULL], $SubjectTypeID, [ $Limit = CONFIG_CORE_SEARCH_RESULTS_LIMIT], integer $ParentID[optional], integer $SubjectTypeID[optional], integer $Limit[optional])
-
string
$SearchQuery
-
integer
$ParentID[optional]
-
integer
$SubjectTypeID[optional]
-
integer
$Limit[optional]
-
$ParentID
-
$SubjectTypeID
-
$Limit
Searches the SubjectSource database
SubjectSource[]
searchSubjectSources
(string $SearchQuery, [ $Limit = CONFIG_CORE_SEARCH_RESULTS_LIMIT], integer $Limit[optional])
-
string
$SearchQuery
-
integer
$Limit[optional]
-
$Limit
Searches the SubjectType database
SubjectType[]
searchSubjectTypes
(string $SearchQuery, [ $Limit = CONFIG_CORE_SEARCH_RESULTS_LIMIT], integer $Limit[optional])
-
string
$SearchQuery
-
integer
$Limit[optional]
-
$Limit
Returns an array containing Subject objects sorted from root to node
Subject[]
traverseSubject
(integer $ID)