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

Class: Pigeonholes

Source Location: d:\website\PhpDocumentor\/pigeonholes/Pigeonholes.php

Class Overview

BitBase
   |
   --LibertyBase
      |
      --LibertyContent
         |
         --Pigeonholes

Pigeonholes


Methods


Inherited Variables

Inherited Methods

Class: LibertyContent

LibertyContent::LibertyContent()
Construct an empty LibertyBase object with a blank permissions array
LibertyContent::addHit()
Increment the content item hit flag by 1
LibertyContent::cacheUrl()
Cache given url If \c $data present (passed) it is just associated \c $url and \c $data.
LibertyContent::copyPermissions()
Copy current permissions to another object
LibertyContent::exportHtml()
Create an export object from the data
LibertyContent::expunge()
Delete content object and all related records
LibertyContent::expungeActionLog()
expungeActionLog
LibertyContent::expungeCacheFile()
Delete cache file for a given content item
LibertyContent::expungeComments()
Delete comment entries relating to the content object
LibertyContent::expungeVersion()
Removes a specific version of a page
LibertyContent::getActionLogs()
Get a list of action log entries
LibertyContent::getAuthorList()
Get a list of users who have created entries in the content table
LibertyContent::getCacheBasePath()
Get the path where we store liberty cached content
LibertyContent::getCacheFile()
Get the path to file where an individual cache item is stored
LibertyContent::getCachePath()
Get the path to directory where an individual cache item is stored
LibertyContent::getContentDescription()
Return content type description for this content object.
LibertyContent::getContentId()
Access a content item type GUID
LibertyContent::getContentList()
Get a list of all structures this content is a member of
LibertyContent::getContentRanking()
Get a list of content ranked by certain criteria set in $pListHash['sort_mode']
LibertyContent::getContentType()
Access a content item type GUID
LibertyContent::getContentTypeDescription()
LibertyContent::getDisplayLink()
Pure virtual function that returns link to display a piece of content
LibertyContent::getDisplayUrl()
Not-so-pure virtual function that returns Request_URI to a piece of content
LibertyContent::getFilter()
LibertyContent::getHistory()
Get complete set of historical data in order to display a given wiki page version
LibertyContent::getHistoryCount()
Get count of the number of historic records for the page
LibertyContent::getHits()
Get Hits and Last Hit
LibertyContent::getNumberOfPages()
Special parsing for multipage articles
LibertyContent::getPage()
Special parsing for a particular page of a multipage article
LibertyContent::getPreference()
Returns the content preferences value for the passed in key.
LibertyContent::getRenderFile()
Pure virtual function that returns the include file that should render a page of content of this type
LibertyContent::getServicesSql()
Set up SQL strings for services used by the object
LibertyContent::getStructures()
Get a list of all structures this content is a member of
LibertyContent::getThumbnailUrl()
Not-so-pure virtual function that returns Request_URI to a content's thumbnail representation. It is up to the derived content what exactly this means If not implemented in the content's class, this class will return NULL, which is an acceptable case meaning no thumbnail is available.
LibertyContent::getTitle()
Create the generic title for a content item
LibertyContent::getUserPermissions()
Get specific permissions for the specified user for this content
LibertyContent::hasAdminPermission()
Determine if current user has the ability to administer this type of content
LibertyContent::hasEditPermission()
Determine if current user has the ability to edit this type of content
LibertyContent::hasPermission()
Check is a user has permission to access the object
LibertyContent::hasUserPermission()
Function that determines if this content specified permission for the current gBitUser
LibertyContent::invokeServices()
Set up access to services used by the object
LibertyContent::isAdminable()
Check permissions to establish if user has permission to admin the object
LibertyContent::isCached()
Check if given url is currently cached locally
LibertyContent::isContentType()
Check user_id to establish if the object that has been loaded was created by the current user
LibertyContent::isEditable()
Check permissions to establish if user has permission to edit the object
LibertyContent::isHidden()
LibertyContent::isInStructure()
Check the number of structures that the content object is being used in
LibertyContent::isOwner()
Check user_id to establish if the object that has been loaded was created by the current user
LibertyContent::isPrivate()
LibertyContent::isProtected()
LibertyContent::isValid()
Check mContentId to establish if the object has been loaded with a valid record
LibertyContent::isViewable()
Check permissions to establish if user has permission to view the object
LibertyContent::load()
Assume a derived class has joined on the liberty_content table, and loaded it's columns already.
LibertyContent::loadAllObjectPermissions()
Load all permissions assigned to a given object. This is not for general consumption.
LibertyContent::loadPermissions()
Check permissions for the object that has been loaded against the permission database
LibertyContent::loadPreferences()
LibertyContent::pageExists()
Determines if a wiki page (row in wiki_pages) exists, and returns a hash of important info. If N pages exists with $pPageName, returned existsHash has a row for each unique pPageName row.
LibertyContent::parseData()
Process the raw content blob using the speified content GUID processor
LibertyContent::postGetList()
Updates results from any getList function to provide the control set
LibertyContent::registerContentType()
Copy current permissions to another object
LibertyContent::removeLastVersion()
Removes last version of the page (from pages) if theres some
LibertyContent::removePermission()
Remove a permission to access the object
LibertyContent::rollbackVersion()
Roll back to a specific version of a page
LibertyContent::setHits()
Set Hits and Last Hit
LibertyContent::setIndexData()
This is a generic liberty content function to gather indexable words. Override this function in your BitPackage.php file if you need to add more indexable words from files other than tiki_content and users_users.
LibertyContent::setPreference()
Set a hash value in the mPrefs hash. This does *NOT* store the value in the database. It does no checking for existing or duplicate values. the main point of this function is to limit direct accessing of the mPrefs hash. I will probably make mPrefs private one day.
LibertyContent::setStructure()
Set content related mStructureId
LibertyContent::store()
Create a new content object or update an existing one
LibertyContent::storeActionLog()
storeActionLog Note: use $gBitSystem throughout that this function can be called statically if needed
LibertyContent::storeHistory()
LibertyContent::storePermission()
Store a permission for the object that has been loaded in the permission database
LibertyContent::storePreference()
Saves a preference to the liberty_content_prefs database table with the given pref name and value. If the value is NULL, the existing value will be delete and the value will not be saved. However, a zero will be stored. This will update the mPrefs hash.
LibertyContent::updateUserPermissions()
This function will replace all permissions for a particular package with the ones set using the content permissions
LibertyContent::verify()
Verify the core class data required to update the liberty_content table entries
LibertyContent::verifyAccessControl()
Check permissions to establish if user has permission to access the object
LibertyContent::verifyActionLog()
verify the data in the action log is ready for storing First checks $pParamHash['action_log'] for information and then the content_store stuff Note: use $gBitSystem throughout that this function can be called statically if needed

Class: LibertyBase

LibertyBase::LibertyBase()
Constructor building on BitBase object
LibertyBase::getLibertyObject()
Given a content_id, this will return and object of the proper type

Class: BitBase

BitBase::BitBase()
During initialisation, we assign a name which is used by the class.
BitBase::debug()
Switch debug level in database
BitBase::display()
This method should be THE method used to display a template. php files should not access $gBitSmarty directly.
BitBase::getDb()
Return pointer to current Database
BitBase::getField()
Returns entry from the mInfo hash if field exists
BitBase::isDatabaseValid()
Determines if there is a valide database connection
BitBase::prepGetList()
Prepares parameters with default values for any getList function
BitBase::setDatabase()
Sets database mechanism for the instance
BitBase::verifyId()
Determines if any given variable exists and is a number

Class Details

[line 35]
Pigeonholes



[ Top ]


Class Methods


constructor Pigeonholes [line 43]

none Pigeonholes( [$pContentId $pStructureId = NULL], [$pStructureId $pContentId = NULL])

initiate class



Tags:

access:  public


Parameters:

$pContentId   $pStructureId   content id of the pigeonhole - use either one of the ids.
$pStructureId   $pContentId   structure id of the pigeonhole - use either one of the ids.

[ Top ]

method alphabetiseMembers [line 493]

a alphabetiseMembers( &$pMememberHash)

Alphabetise all member items



Tags:

return:  nicely grouped set of pigeonhole members in a set of columns and starting letters.
access:  public


Parameters:

   &$pMememberHash  

[ Top ]

method checkPathPermissions [line 468]

a checkPathPermissions( $pPath)

Check permissions of all nodes that lead to this



Tags:

return:  nicely grouped set of pigeonhole members in a set of columns and starting letters.
access:  public


Parameters:

   $pPath  

[ Top ]

method expunge [line 745]

bool expunge( [ $pStructureId = NULL])

Expunge currently loaded pigeonhole



Tags:

return:  TRUE on success, FALSE if store could not occur.
access:  public


Overrides LibertyContent::expunge() (Delete content object and all related records)

Parameters:

   $pStructureId  

[ Top ]

method expungePigeonholeMember [line 710]

bool expungePigeonholeMember( $pParamHash['parent_id'] $pParamHash, $pParamHash['member_id'] 1, $pParamHash['deletables'] 2)

Expunge pigeonhole member



Tags:

return:  TRUE on success, FALSE if store could not occur. If FALSE, $this->mErrors will have reason why
access:  public


Parameters:

$pParamHash['member_id']   1   content_id of content to be deleted
$pParamHash['deletables']   2   array of content_ids to check against when deleting. makes sure that only members of a given structure are removed Note if only one of the 2 ids is given, all items with that id will be removed. if both are given, only that one particular entry is removed
$pParamHash['parent_id']   $pParamHash   parent_id of content to be deleted

[ Top ]

method getAssignableContent [line 172]

array getAssignableContent( &$pListHash)

get all items that are not part of a pigeonhole yet



Tags:

return:  of content not in any pigeonhole yet
access:  public


Parameters:

   &$pListHash  

[ Top ]

method getDisplayLink [line 829]

the getDisplayLink( [$pTitle $pTitle = NULL], [$pContentId $pMixed = NULL])

Returns HTML link to display a pigeonhole



Tags:

return:  link to display the page.


Overrides LibertyContent::getDisplayLink() (Pure virtual function that returns link to display a piece of content)

Parameters:

$pTitle   $pTitle   is the pigeonhole we want to see
$pContentId   $pMixed   content id of the pigeonhole in question

[ Top ]

method getDisplayPath [line 337]

the getDisplayPath( $pPath $pPath)

Converts a structure path into valid html links



Tags:

return:  link to display the page.


Parameters:

$pPath   $pPath   path given by getPigenholePath()

[ Top ]

method getDisplayUrl [line 802]

the getDisplayUrl( [$pContentId $pContentId = NULL], [ $pMixed = NULL])

Generates the URL to this pigeonhole



Tags:

return:  link to display the page.


Overrides LibertyContent::getDisplayUrl() (Not-so-pure virtual function that returns Request_URI to a piece of content)

Parameters:

$pContentId   $pContentId   is the pigeonhole id we want to see
   $pMixed  

[ Top ]

method getList [line 363]

array getList( $pListHash &$pListHash, $pListHash[sort_mode] 1, $pListHash[find] 2, $pListHash[max_records] 3, $pListHash[offset] 4, $pListHash[title] 5, $pListHash[parent_id] 6, $pListHash[root_structure_id] 7, $pListHash[load_only_root] 8, $pListHash[parent_content_id] 9, $pListHash[load_also_root] 10)

get list of all pigeonholes



Tags:

return:  of pigeonholes in 'data' and count of pigeonholes in 'cant'
access:  public


Parameters:

$pListHash[sort_mode]   1   column and orientation by which search results are sorted
$pListHash[find]   2   search for a pigeonhole title - case insensitive
$pListHash[max_records]   3   maximum number of rows to return
$pListHash[offset]   4   number of results data is offset by
$pListHash[title]   5   pigeonhole name
$pListHash[parent_id]   6   pigeonhole parent_id, optional
$pListHash[root_structure_id]   7   only load the pigoenhole this root_structure_id is part of
$pListHash[load_only_root]   8   only load top most items
$pListHash[parent_content_id]   9   all the sons of the pigeonhole parent content_id , optional
$pListHash[load_also_root]   10   if parent_content_id is set load also the father, optionnal
$pListHash   &$pListHash   contains array of items used to limit search results

[ Top ]

method getMemberList [line 108]

array getMemberList( [$pContentId $pListHash = NULL])

get all content inserted in a given pigeonhole. if no id is given, it gets all content for all pigeonholes



Tags:

return:  of pigeonhole members with according title and content type guid
access:  public


Parameters:

$pContentId   $pListHash   content id of the pigeonhole

[ Top ]

method getPigeonholePath [line 315]

path getPigeonholePath( [$pStructureId $pStructureId = NULL])

get the path of a pigeonhole



Tags:

return:  in form of an array
access:  public


Parameters:

$pStructureId   $pStructureId   structure id of pigeonhole, if no id is given, it gets the id from $this->mStructureId

[ Top ]

method getPigeonholesFromContentId [line 297]

basic getPigeonholesFromContentId( $pContentId $pContentId)

get all pigeonholes where the contenent has been inserted



Tags:

return:  information about item requested
access:  public


Parameters:

$pContentId   $pContentId   content id of item in question

[ Top ]

method getPigeonholesPathList [line 248]

TRUE getPigeonholesPathList( [numeric $pContentId = NULL], [numeric $pTruncate = FALSE])

get an array of paths for all pigeonholes. used for pages where data can be inserted into pigeonholes



Tags:

return:  on success, FALSE if there is no pigeonhole
TODO:  We need to sort the returned values that successive pigoenholes are grouped together.
access:  public


Parameters:

numeric   $pContentId   content id of pigeonhole.
numeric   $pTruncate   Setting this to a number will do some smart truncations depending on how many parents there are setting it to 60 will allow 30 chars for all parents combined and 30 for the actual title

[ Top ]

method insertPigeonholeMember [line 660]

bool insertPigeonholeMember( $pParamHash &$pParamHash, $pParamHash[parent_id] 1, $pParamHash[content_id] 2)

Store pigeonhole member



Tags:

return:  TRUE on success, FALSE if store could not occur. If FALSE, $this->mErrors will have reason why
access:  public


Parameters:

$pParamHash[parent_id]   1   id of pigeonhole it belongs to, default is $this->mContentId
$pParamHash[content_id]   2   content_id of the item to be stored
$pParamHash   &$pParamHash   an array of content to be stored.

[ Top ]

method load [line 64]

bool load( [$pExtras $pExtras = FALSE])

load the pigeonhole



Tags:

return:  TRUE on success, FALSE if it's not valid
access:  public


Overrides LibertyContent::load() (Assume a derived class has joined on the liberty_content table, and loaded it's columns already.)

Parameters:

$pExtras   $pExtras   boolean - if set to true, pigeonhole content is added as well

[ Top ]

method store [line 525]

bool store( $pParamHash &$pParamHash, $pParamHash[title] 1, $pParamHash[edit] 2, $pParamHash[members] 3, $pParamHash[root_structure_id] 4, $pParamHash[parent_id] 5)

Store pigeonhole data



Tags:

return:  TRUE on success, FALSE if store could not occur. If FALSE, $this->mErrors will have reason why
access:  public


Overrides LibertyContent::store() (Create a new content object or update an existing one)

Parameters:

$pParamHash[title]   1   title of the new pigeonhole
$pParamHash[edit]   2   description of the pigeonhole
$pParamHash[members]   3   array of content_ids that are associated with this pigeonhole
$pParamHash[root_structure_id]   4   if this is set, it will add the pigeonhole to this structure. if it's not set, a new structure / top level pigeonhole is created
$pParamHash[parent_id]   5   set the structure_id that will server as the parent in the structure
$pParamHash   &$pParamHash   contains all data to store the pigeonholes

[ Top ]


Documentation generated on Thu, 15 Feb 2007 20:47:03 +0000 by phpDocumentor 1.3.0