Class mosContainer

Description

Abstract class for classes where the objects of the class can be relatively easily stored in a single database table. Can usually be adapted to more complex cases.

Requires child classes to implement: tableName(), notSQL(). tableName() must return the name of the database table, using #__ in the usual Mambo way notSQL() must return an array of strings, where each string is the name of a variable that is NOT in the database table, or is not written explicitly, e.g. the auto-increment key. If this is the ONLY non-SQL field, then the child class need not implement it, as that it is already in the abstract class. Child classes may implement timeStampField, in which case it must return the name of a field that will have a timestamp placed in it whenever the DB is written.

  • author: Martin Brampton counterpoint@mambo-foundation.org

Located in /components/com_containers/containers.class.php (line 3)

mosDBAbstractRow
   |
   --mosTableEntry
      |
      --mosContainer
Variable Summary
 array $children
 string $description
 string $icon
 int $id
 bool $isTrash
 string $keywords
 bool $loaded
 string $name
 int $ordering
 int $parentid
 bool $published
 string $windowtitle
Method Summary
 void addChild ( $id)
 void &addChildren ( &$descendants, [ $published = true], [ $search = ''], [ $recurse = false])
 void addSelectList ( $prefix,  &$selector,  $notThis,  $published)
 void deleteAll ()
 void getCategory ()
 void getCategoryName ([ $showself = false])
 void &getChildren ([ $published = true], [ $search = ''])
 void &getDescendants ([ $search = ''])
 void getFamilyNames ([ $include = false])
 void &getIcons ()
 void &getParent ()
 void getSelectList ( $type,  $parm,  $published, [ $notThis = 0])
 void getURL ()
 void isCategory ()
 void isTrash ()
 void load ()
 void mosImageURL ( $imageName, [ $width = 32], [ $height = 32])
 void notSQL ()
 void saveValues ()
 void setMetaData ()
 void setPathway ()
 void tableName ()
 void togglePublished ( $idlist,  $value)
 void trash ()
Variables
array $children = array() (line 25)
  • var: Child containers
  • access: protected
string $description = '' (line 17)
  • var: Container description
  • access: public
string $icon = '' (line 21)
  • var: Icon - not sure how this is used
  • access: public
int $id = 0 (line 5)
  • var: ID for container record in database
  • access: public
bool $isTrash = false (line 27)
  • var: When true, the item is marked as trash
  • access: protected
string $keywords = '' (line 11)
  • var: Key words
  • access: public
bool $loaded = 0 (line 23)
  • var: Has all the data been loaded (rather than just the basics)
  • access: protected
string $name = '' (line 15)
  • var: Name of container
  • access: public
int $ordering = 0 (line 7)
  • var: Ordering
  • access: public
int $parentid = 0 (line 13)
  • var: ID of parent container in database if a folder
  • access: public
bool $published = false (line 19)
  • var: Is the container published?
  • access: public
string $windowtitle = '' (line 9)
  • var: Window title
  • access: public

Inherited Variables

Inherited from mosDBAbstractRow

mosDBAbstractRow::$_error
mosDBAbstractRow::$_tbl
mosDBAbstractRow::$_tbl_key
Methods
addChild (line 61)
void addChild ( $id)
  • $id
addChildren (line 110)
void &addChildren ( &$descendants, [ $published = true], [ $search = ''], [ $recurse = false])
  • &$descendants
  • $published
  • $search
  • $recurse
addSelectList (line 149)
void addSelectList ( $prefix,  &$selector,  $notThis,  $published)
  • $prefix
  • &$selector
  • $notThis
  • $published
deleteAll (line 65)
void deleteAll ()
getCategory (line 90)
void getCategory ()
getCategoryName (line 84)
void getCategoryName ([ $showself = false])
  • $showself
getChildren (line 124)
void &getChildren ([ $published = true], [ $search = ''])
  • $published
  • $search
getDescendants (line 130)
void &getDescendants ([ $search = ''])
  • $search
getFamilyNames (line 96)
void getFamilyNames ([ $include = false])
  • $include
getIcons (line 160)
void &getIcons ()
getParent (line 136)
void &getParent ()
getSelectList (line 142)
void getSelectList ( $type,  $parm,  $published, [ $notThis = 0])
  • $type
  • $parm
  • $published
  • $notThis
getURL (line 154)
void getURL ()
isCategory (line 79)
void isCategory ()
isTrash (line 57)
void isTrash ()
load (line 37)
void load ()
mosImageURL (line 181)
void mosImageURL ( $imageName, [ $width = 32], [ $height = 32])
  • $imageName
  • $width
  • $height
notSQL (line 33)
void notSQL ()

Redefinition of:
mosTableEntry::notSQL()
saveValues (line 46)
void saveValues ()
setMetaData (line 72)
void setMetaData ()
setPathway (line 157)
void setPathway ()
tableName (line 29)
void tableName ()
togglePublished (line 175)
void togglePublished ( $idlist,  $value)
  • $idlist
  • $value
trash (line 53)
void trash ()

Inherited Methods

Inherited From mosTableEntry

 mosTableEntry::addPostData()
 mosTableEntry::delete()
 mosTableEntry::forceBools()
 mosTableEntry::insertSQL()
 mosTableEntry::notSQL()
 mosTableEntry::prepareValues()
 mosTableEntry::readDataBase()
 mosTableEntry::setValues()
 mosTableEntry::timeStampField()
 mosTableEntry::updateObjectDB()
 mosTableEntry::updateSQL()

Inherited From mosDBAbstractRow

 mosDBAbstractRow::mosDBAbstractRow()
 mosDBAbstractRow::check()
 mosDBAbstractRow::lacks()
 mosDBAbstractRow::move()
 mosDBAbstractRow::updateOrder()

Documentation generated on Mon, 05 May 2008 16:18:16 +0400 by phpDocumentor 1.4.0