Inheritance diagram for ObjectManager:
The parent class that implements all the searching / sorting of all the objects. This class provides outputs on the searched data in a variety of formats: html - default, used for showing a website xml - XML output of the public data on the objects json - JSON output of the public data on the objects. good for ajax php - PHP serialized() output of the public data on the objects. good for exporting to other PHP scripts rss - RSS formatted data on the object. very handy for creating RSS feeds on anything and everything on your site.
Definition at line 13 of file object-manager.inc.php.
Public Member Functions | |
__construct ($objectType, $table=null, $numRows=15) | |
factory ($data=null) | |
create a new object of the type we need. | |
getSortOptionXml () | |
get our option xml string for what we can sort on. | |
delete ($rs) | |
delete a set of objects. | |
getPagesXml () | |
get our pages... | |
getSearchPageXml () | |
our search page xml configuration. | |
getSearchParamXml () | |
our search page parameter xml configuration. | |
initMainPage () | |
initialize our main page... | |
initSearchPage () | |
initialize our search page. | |
drawSearchPage () | |
draw our search page! | |
initSearch ($params) | |
initialize our search. | |
getSearchQuery ($params) | |
get teh entire search query. | |
drawPagination () | |
draws our pagination info wrapped in a div with id of 'pagination' | |
getPaginationStats () | |
get a string about our pagination. | |
getPaginationNav () | |
get our pagination nav. | |
getPaginationUrl ($page) | |
get a pagination url | |
getPaginationLink ($page, $link=null) | |
get a pagination link | |
getPaginationFirst () | |
get our first page link. | |
getPaginationPrev () | |
get our previous page link. | |
getPaginationNext () | |
get our next page link. | |
getPaginationLast () | |
get our last page link. | |
hasPage ($page) | |
determines if a page exists or not | |
calculatePagination () | |
calculate our pagination stuff... | |
getSearchResult () | |
get our search result. | |
drawResults ($rs) | |
draws our result set. | |
drawRssLink ($params=null) | |
draw our rss link. | |
getRssLink ($link, $text, $addFeed=true) | |
This gets a link to the rss feed! Its super easy. | |
getPlainRssLink ($link, $text, $addFeed=true) | |
get a plain text link to the rss feed | |
drawNoResults () | |
this function is called on a search page when there are no results. | |
drawRows ($rs, $class=null) | |
this draws the rows for each object. | |
drawLines ($rs, $class=null) | |
This draws all the objects in one-line form. | |
userSearch ($userId, $limit=null) | |
search for a user's content.. | |
search ($params=array(), $limit=null) | |
search for objects. | |
searchCount ($params=array(), $cache=true) | |
just like search, except all you get is a count of objects. | |
generateRss ($params=array(), $useCached=true) | |
generate our rss. | |
getPublicData ($params) | |
get our public data. | |
isAdmin () | |
This function determines admin status. | |
createSearchForm ($query=null) | |
create our search form for searching. | |
drawSearchForm () | |
draw our search form for doing fulltext searches | |
Public Attributes | |
$objectType | |
public. | |
$object | |
public. | |
$useRss = true | |
public Bool that determines if we use rss or not | |
$numResults | |
public The total number of results we got. | |
$numRows | |
public The number of results per page (default: 15) | |
$useFullTextSearch = true | |
boolean of whether we use fulltext search or not. | |
Static Public Attributes | |
$cacheSearchCount = true | |
do we cache the search query count? | |
$cacheSearchQuery = false | |
do we cache search query results? | |
$searchCacheLife = 300 | |
how long to cache the results of our search querys (count and the actual select) | |
Protected Member Functions | |
getSortFieldsArray () | |
this function gets all the possible sort values. | |
getSearchOutputXml () | |
get the xml for our search output types | |
initSearchPageOutput () | |
initialize the search page output type. | |
initPHPOutput () | |
init the page for PHP output: blank template | |
initJSONOutput () | |
init the page for JSON output: blank template | |
initRSSOutput () | |
init the page for RSS output: blank template | |
initXMLOutput () | |
init page for XML output: XMLTemplate and checks to see if needed classes exist | |
initAutocompleteOutput () | |
init page for autocomplete. | |
initHTMLOutput () | |
init page for HTML output: nothing to do | |
drawHTMLOutput () | |
draw our HTML output: draw a search form, and the results | |
drawRssOutput () | |
draw our rss page. | |
drawJSONOutput () | |
draw our json page. | |
drawXMLOutput () | |
draw our xml page. | |
drawPHPOutput () | |
draw our php serialize page... | |
drawAutocompleteOutput () | |
draw autocomplete page. | |
getSearchSelect ($params=array()) | |
get the select part of our search query. | |
getSearchCountSelect ($params=array()) | |
get the select count part of our search query. | |
getSearchFrom ($params=array()) | |
get the from/join part of our search query. | |
getSearchWhere ($params=array()) | |
get the where part of our search query. | |
getFullTextSearch ($query) | |
get our fulltext search MATCH string. | |
getLikeSearch ($query) | |
get our like search string. | |
getSearchGroupBy ($params=array()) | |
get the group by part of our search query. | |
getPrivacyWhere ($params=array()) | |
get the where by part of our search query. | |
getSearchOrder ($params=array()) | |
get the order part of our search query. | |
doObjectSearch () | |
do the search for the objects | |
loadObjects ($data) | |
load the database data into an array of objects | |
Protected Attributes | |
$table | |
protected. | |
$query | |
protected The query string to use for getting objects | |
Private Attributes | |
$resultPage = 0 | |
private what result page we're on. | |
$startRow = 0 | |
private the row to start on. | |
$endRow = 0 | |
private the row to end on. | |
$searchParams = array() | |
private the array of parameters used in the last search |
|
Reimplemented in BaseGallery. Definition at line 96 of file object-manager.inc.php. |
|
calculate our pagination stuff... what we start on, end on, etc. Definition at line 1004 of file object-manager.inc.php. Referenced by getSearchResult(). |
|
create our search form for searching.
Definition at line 1423 of file object-manager.inc.php. References $query, BaseModule::getUrl(), and BaseModule::params(). Referenced by drawSearchForm(). |
|
delete a set of objects.
Definition at line 183 of file object-manager.inc.php. |
|
do the search for the objects if ObjectManager::cacheSearchQuery is true, it will try to load it from the cache. otherwise it will do the query itself.
Definition at line 1045 of file object-manager.inc.php. References dbFetchAssoc(), dbQuery(), CacheBot::get(), and CacheBot::set(). Referenced by getSearchResult(). |
|
draw autocomplete page. basically just get our data, wrap it in a
Definition at line 552 of file object-manager.inc.php. References getSearchResult(). Referenced by drawSearchPage(). |
|
draw our HTML output: draw a search form, and the results
Reimplemented in BaseInvitations. Definition at line 481 of file object-manager.inc.php. References drawNoResults(), drawResults(), drawSearchForm(), and getSearchResult(). Referenced by drawSearchPage(). |
|
draw our json page. get public data and encode. Definition at line 509 of file object-manager.inc.php. References JSON::encode(), and getPublicData(). Referenced by drawSearchPage(). |
|
This draws all the objects in one-line form. they are wrapped in a div of objectType + Line
Definition at line 1243 of file object-manager.inc.php. |
|
this function is called on a search page when there are no results.
Definition at line 1184 of file object-manager.inc.php. Referenced by drawHTMLOutput(). |
|
draws our pagination info wrapped in a div with id of 'pagination'
Definition at line 844 of file object-manager.inc.php. References getPaginationNav(), and getPaginationStats(). Referenced by drawResults(). |
|
draw our php serialize page... echo the serialized() public data. Definition at line 541 of file object-manager.inc.php. Referenced by drawSearchPage(). |
|
draws our result set. pagination, rows, rss link.
Definition at line 1114 of file object-manager.inc.php. References drawPagination(), drawRows(), and drawRssLink(). Referenced by BaseCalendar::drawCalendarPage(), BaseCalendar::drawDatePage(), and drawHTMLOutput(). |
|
this draws the rows for each object. calls drawHeaderRow() on teh object, and then drawRow() on each object in teh result set. each object is wrapped in a div of class $class.
Definition at line 1197 of file object-manager.inc.php. Referenced by drawResults(). |
|
draw our rss link.
Definition at line 1129 of file object-manager.inc.php. References getRssLink(), and BaseModule::params(). Referenced by drawResults(). |
|
draw our rss page. generate, draw, and save. Definition at line 500 of file object-manager.inc.php. References generateRss(). |
|
draw our search form for doing fulltext searches
Definition at line 1453 of file object-manager.inc.php. References createSearchForm(), and BaseModule::needsJs(). Referenced by BaseCalendar::drawCalendarPage(), and drawHTMLOutput(). |
|
draw our search page!
Definition at line 440 of file object-manager.inc.php. References drawAutocompleteOutput(), drawHTMLOutput(), drawJSONOutput(), drawPHPOutput(), drawXMLOutput(), and BaseModule::params(). Referenced by BaseCalendar::drawPastPage(), BaseCalendar::drawPopularPage(), and BaseCalendar::drawUpcomingPage(). |
|
draw our xml page. get public data and encode. Definition at line 519 of file object-manager.inc.php. References getPublicData(). Referenced by drawSearchPage(). |
|
create a new object of the type we need.
Reimplemented in BaseThread. Definition at line 124 of file object-manager.inc.php. Referenced by __construct(), and loadObjects(). |
|
generate our rss. uses the feedcreator class.
Definition at line 1344 of file object-manager.inc.php. References Config::get(), and search(). Referenced by drawRssOutput(). |
|
get our fulltext search MATCH string.
Definition at line 758 of file object-manager.inc.php. Referenced by getSearchSelect(), and getSearchWhere(). |
|
get our like search string. used to match against the BaseObject::likeFields with sql format LIKE '%$query%'
Definition at line 776 of file object-manager.inc.php. Referenced by getSearchWhere(). |
|
get our pages... default + php, rss, json, and search.
Reimplemented from BaseModule. Reimplemented in BaseCalendar, BaseInbox, and BaseOutbox. Definition at line 195 of file object-manager.inc.php. References getSearchPageXml(). |
|
get our first page link.
Definition at line 947 of file object-manager.inc.php. References getPaginationLink(). Referenced by getPaginationNav(). |
|
get our last page link.
Definition at line 977 of file object-manager.inc.php. References getPaginationLink(). Referenced by getPaginationNav(). |
|
get a pagination link
Definition at line 930 of file object-manager.inc.php. References getPaginationUrl(). Referenced by getPaginationFirst(), getPaginationLast(), getPaginationNav(), getPaginationNext(), and getPaginationPrev(). |
|
get our pagination nav. pages, prev/next, etc.
Definition at line 867 of file object-manager.inc.php. References $s, getPaginationFirst(), getPaginationLast(), getPaginationLink(), getPaginationNext(), getPaginationPrev(), and hasPage(). Referenced by drawPagination(). |
|
get our next page link.
Definition at line 967 of file object-manager.inc.php. References getPaginationLink(). Referenced by getPaginationNav(). |
|
get our previous page link.
Definition at line 957 of file object-manager.inc.php. References getPaginationLink(). Referenced by getPaginationNav(). |
|
get a string about our pagination. a-b of x, etc.
Definition at line 857 of file object-manager.inc.php. Referenced by drawPagination(). |
|
get a pagination url
Definition at line 911 of file object-manager.inc.php. References BaseModule::getUrl(), and search(). Referenced by getPaginationLink(). |
|
get a plain text link to the rss feed
Definition at line 1173 of file object-manager.inc.php. References BaseModule::addFeed(), and BaseModule::getLink(). Referenced by getRssLink(). |
|
get the where by part of our search query. this is specifically for privacy options.
Definition at line 802 of file object-manager.inc.php. Referenced by getSearchWhere(). |
|
get our public data. actually its an array of the object's public data... but same diff.
Definition at line 1384 of file object-manager.inc.php. References search(). Referenced by drawJSONOutput(), and drawXMLOutput(). |
|
This gets a link to the rss feed! Its super easy. Plus it includes the rss icon and a help link.
Definition at line 1157 of file object-manager.inc.php. References getPlainRssLink(). Referenced by BaseThread::drawCommentTable(), and drawRssLink(). |
|
get the select count part of our search query.
Definition at line 658 of file object-manager.inc.php. Referenced by getSearchQuery(). |
|
get the from/join part of our search query.
Reimplemented in BaseCalendar, BaseInbox, and BaseOutbox. Definition at line 668 of file object-manager.inc.php. Referenced by getSearchQuery(). |
|
get the group by part of our search query.
Reimplemented in BaseCalendar. Definition at line 792 of file object-manager.inc.php. Referenced by getSearchQuery(). |
|
get the order part of our search query.
Reimplemented in BaseCalendar, and BaseForumThreads. Definition at line 811 of file object-manager.inc.php. Referenced by getSearchQuery(). |
|
get the xml for our search output types
Definition at line 302 of file object-manager.inc.php. Referenced by getSearchParamXml(). |
|
our search page xml configuration.
Definition at line 211 of file object-manager.inc.php. References getSearchParamXml(). Referenced by getPagesXml(). |
|
our search page parameter xml configuration.
Reimplemented in BaseCalendar, BaseForumThreads, BaseInbox, BaseInvitations, and BaseThread. Definition at line 225 of file object-manager.inc.php. References getSearchOutputXml(), and getSortOptionXml(). Referenced by getSearchPageXml(). |
|
get teh entire search query.
Definition at line 593 of file object-manager.inc.php. References dbFetchAssoc(), dbQuery(), CacheBot::get(), getSearchCountSelect(), getSearchFrom(), getSearchGroupBy(), getSearchOrder(), getSearchSelect(), getSearchWhere(), and CacheBot::set(). Referenced by initSearch(). |
|
get our search result. used to do query, setup array of objects, preload secondary objects to save queries (users, comments, etc..), also calculates pagination.
Definition at line 1023 of file object-manager.inc.php. References calculatePagination(), doObjectSearch(), and loadObjects(). Referenced by drawAutocompleteOutput(), drawHTMLOutput(), and search(). |
|
get the select part of our search query.
Reimplemented in BaseCalendar, and BaseInbox. Definition at line 642 of file object-manager.inc.php. References getFullTextSearch(). Referenced by getSearchQuery(). |
|
get the where part of our search query.
Reimplemented in BaseAlerts, BaseCalendar, BaseForumThreads, BaseInbox, BaseInvitations, BaseOutbox, and BaseUserActions. Definition at line 680 of file object-manager.inc.php. References getFullTextSearch(), getLikeSearch(), getPrivacyWhere(), and BaseModule::parseModuleXml(). Referenced by getSearchQuery(). |
|
this function gets all the possible sort values. override this to add sortable fields. name, birthday, etc.
Reimplemented in BaseCalendar, BaseForums, and BaseInbox. Definition at line 152 of file object-manager.inc.php. Referenced by getSortOptionXml(). |
|
get our option xml string for what we can sort on.
Definition at line 134 of file object-manager.inc.php. References getSortFieldsArray(). Referenced by getSearchParamXml(). |
|
determines if a page exists or not
Definition at line 991 of file object-manager.inc.php. Referenced by getPaginationNav(). |
|
init page for autocomplete. no template just blank page.
Definition at line 424 of file object-manager.inc.php. References BaseModule::setTemplate(). Referenced by initSearchPageOutput(). |
|
init page for HTML output: nothing to do
Definition at line 433 of file object-manager.inc.php. Referenced by initSearchPageOutput(). |
|
init the page for JSON output: blank template
Definition at line 393 of file object-manager.inc.php. References BaseModule::setTemplate(). Referenced by initSearchPageOutput(). |
|
initialize our main page... basically redirect to search page. you'll lose your parameters... dont link to main page. Reimplemented from BaseModule. Reimplemented in BaseCalendar, and BaseThread. Definition at line 319 of file object-manager.inc.php. References Util::redirect(). |
|
init the page for PHP output: blank template
Definition at line 385 of file object-manager.inc.php. References BaseModule::setTemplate(). Referenced by initSearchPageOutput(). |
|
init the page for RSS output: blank template
Definition at line 401 of file object-manager.inc.php. References BaseModule::setTemplate(). Referenced by initSearchPageOutput(). |
|
initialize our search. sets up the query string.
Definition at line 569 of file object-manager.inc.php. References dbEscape(), and getSearchQuery(). Referenced by initSearchPage(), search(), and searchCount(). |
|
initialize our search page. pass off to initSearch() Reimplemented in BaseAlerts, BaseCalendar, BaseInbox, BaseInvitations, BaseOutbox, BaseThread, and BaseUserActions. Definition at line 327 of file object-manager.inc.php. References initSearch(), initSearchPageOutput(), BaseModule::params(), search(), and BaseModule::setParam(). |
|
initialize the search page output type. passes it off to each initFooOutput() function Definition at line 349 of file object-manager.inc.php. References initAutocompleteOutput(), initHTMLOutput(), initJSONOutput(), initPHPOutput(), initRSSOutput(), initXMLOutput(), and BaseModule::params(). Referenced by initSearchPage(). |
|
init page for XML output: XMLTemplate and checks to see if needed classes exist
Definition at line 409 of file object-manager.inc.php. References BaseModule::setTemplate(). Referenced by initSearchPageOutput(). |
|
This function determines admin status. (passes off to object->isAdmin())
Definition at line 1413 of file object-manager.inc.php. |
|
load the database data into an array of objects
Reimplemented in BaseInbox. Definition at line 1079 of file object-manager.inc.php. References factory(), and CacheBot::get(). Referenced by getSearchResult(). |
|
search for objects. you can call this to do custom searches.
Reimplemented in BaseCalendar. Definition at line 1291 of file object-manager.inc.php. References getSearchResult(), and initSearch(). Referenced by BaseThread::delete(), generateRss(), BaseThread::getComments(), getPaginationUrl(), getPublicData(), initSearchPage(), and userSearch(). |
|
just like search, except all you get is a count of objects. use this when you only want the count (a cheap query) and not an array of the results.
Definition at line 1318 of file object-manager.inc.php. References initSearch(). |
|
search for a user's content..
Definition at line 1276 of file object-manager.inc.php. References search(). |
|
do we cache the search query count?
Definition at line 73 of file object-manager.inc.php. |
|
do we cache search query results?
Definition at line 78 of file object-manager.inc.php. |
|
private the row to end on. based on resultPage and numRows Definition at line 63 of file object-manager.inc.php. |
|
public The total number of results we got.
Definition at line 38 of file object-manager.inc.php. |
|
public The number of results per page (default: 15)
Definition at line 43 of file object-manager.inc.php. |
|
public. Our object that we're working on. Definition at line 28 of file object-manager.inc.php. Referenced by __construct(). |
|
public. The name of the class of the object we're working on. Definition at line 23 of file object-manager.inc.php. |
|
protected The query string to use for getting objects
Definition at line 48 of file object-manager.inc.php. Referenced by createSearchForm(). |
|
private what result page we're on. (default: 0) Definition at line 53 of file object-manager.inc.php. |
|
how long to cache the results of our search querys (count and the actual select)
Definition at line 83 of file object-manager.inc.php. |
|
private the array of parameters used in the last search
Definition at line 68 of file object-manager.inc.php. |
|
private the row to start on. based on resultPage and numRows Definition at line 58 of file object-manager.inc.php. |
|
protected. The name of the database table its linked to. Definition at line 18 of file object-manager.inc.php. Referenced by __construct(). |
|
boolean of whether we use fulltext search or not.
Definition at line 88 of file object-manager.inc.php. |
|
public Bool that determines if we use rss or not
Definition at line 33 of file object-manager.inc.php. |