Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: c:/web/jpeto2/jpeto/jpeto_object.php
JPETo - James's Publishing & Edition Tool - jpeto_objects

jpeto_object

jpeto_core
   |
  +-- jpeto_object

This class provides the functionality for the jpeto_object table

 

private class jpeto_object extends jpeto_core

This class provides the functionality for the jpeto_object table

 
Direct known subclasses: jpeto_container, jpeto_answer, jpeto_article, jpeto_daterange, jpeto_ecard_button, jpeto_event, jpeto_extended_container, jpeto_extphp, jpeto_file, jpeto_forum, jpeto_forummessage, jpeto_glossary, jpeto_inquiry, jpeto_inquiry_option, jpeto_link, jpeto_location, jpeto_node, jpeto_objectpicker, jpeto_page, jpeto_picture, jpeto_product, jpeto_question, jpeto_questionnaire, jpeto_search, jpeto_sitemap, jpeto_table, jpeto_tablerow, jpeto_timerange, jpeto_tms_customer, jpeto_tms_expense, jpeto_tms_project, jpeto_tms_projectphase, jpeto_tms_travel, jpeto_tms_user, jpeto_tms_worktime

Methods inherited from jpeto_core

jpeto_core, getkey, getuniqueidfromkey, getlanguagefromkey, getversionfromkey, conv, translate, reconv

Public Method Summary

void

jpeto_object([ integer $JpetoType, string $Language, string $Version ])

constructor for jpeto_object
boolean

get_next_jpeto_object()

Gets the next object of a specific type for the defined Language and Version

Private Method Summary

string

getIcon()

Returns a complete img-tag for the searchresult
void

createAdminInterface(int &$AdminInterface)

sets the editable properties in the AdminInterface
array

getFields()

returns all the fields of the database table associated with the object.
string

getSubtype()

This function returns a SubObject (if there's just one)
void

getJpetoTypeDetails(integer $JpetoType)

loads the details for the given JpetoType
integer

getJpetoType(integer $UniqueID)

gets the JpetoType for a specified UniqueID
string

getJoin()

returns a sql string for joining the object-table with the [JpetoType]-table
Boolean

isOnline(object jpeto_object $Object)

returns the online status of an object (depending on the isOnline Flag, the OnlineStart & OnlineEnd)
void

get_jpeto_object(integer $UniqueID, [ Boolean $follow ])

Gets one object identified by it's UniqueID
integer

numChildren()

Returns the number of Child Objects
boolean

isExpired()

Boolean is Expired
boolean

isLocked()

Boolean is Locked
boolean

lock()

Locks the current object
boolean

unlock()

Unlocks all objects locked by a specific user
void

assignContent(object jpeto_object $Object)

This function assigns the content (by default into one column, with line-breaks as seperator)
void

stripLastLinebreak()

removes the linebreak after the last object
void

mapFields(array $Recordset)

Maps the fields of the given recordset to the object variables
void

mapTypeFields(array $Recordset)

Maps the type-specific fields of the given recordset to the object-type variables
void

mapObjectFields(array $Recordset)

Maps the fields of the given recordset to the object variables
int

newUniqueID()

gets an unused UniqueID
void

debug()

returns the elements of the object as a html table
boolean

delete([ integer $UniqueID ])

deletes the current object identified by its UniqueID, Language, Version
string

getOnlineStatusImage()

Returns a image-tag to display the online status of an object
String

getFromURLKey()

returns the primary key of the current object as From QueryString
String

getToURLKey()

returns the primary key of the current object as To QueryString
string

addAdminLink(string $Content)

returns a link to the admin interface of the current object
boolean

isCached()

Checks if the current object is already in cache
String

getCacheFileName()

Returns a cache filename
void

toCache(string $Content)

Writes the given Content-String to the Cache Directory
string

getCache()

returns the Cached Object
boolean

purgeCache()

removes the object from the Cache
boolean

store()

stores the current object
void

getDefaultValues()

gets default Values for (not set) parameters
void

updateObject()

updates the current object in the subtable
void

insertObject()

inserts the current object in the subtable
void

addSubObject(object jpeto_object $SubObject)

maps a given Subobject to the current Object
boolean

isRestricted()

returns whether the access of the current object is restricted or not
void

toHTML()

returns the current object rendered as html
void

toDetailHTML()

returns the current object rendered in detail as html
string

xmlFormat(string $String)

formats a string with xml entities
string

xmlElement(string $elementName)

renders a string to xml
String

toXML()

converts the current object into xml data
String

getBoundary()

returns a Unique Boundary ID for the current object
String

getContentID()

returns a Unique Content ID for the current object
string

toPlainText()

returns a "stupid" plain text conversion of the current object.
String

getMailData()

Converts HTML Code to Mail-conform HTML Code
void

upgrade()

upgrades an object of an unknown type to the complete object
String

getOrigin([ Integer $excludeJpetoType ])

this function returns the original URL of the current object. (the node to which the current object was mapped first)

Fields inherited from jpeto_core

$j_language, $j_version, $o_jpetotype, $adminmode, $islast, $isfirst, $recordset, $pointer, $subtype, $j_parentobject

Private Field Summary

integer

$j_UniqueID

unique identifier of current object
integer

$o_UniqueID

unique identifier of current object (backup copy of $UniqueID)
string

$o_Language

language of the current element (backup copy of $Language)
string

$o_Version

Version
integer

$j_JpetoType

Type of current element
string

$j_OnlineStart

Date from which on the object is online
string

$j_OnlineEnd

Date from which on the object is offline
integer

$j_isOnline

object is online (=1) or offline (=0)
string

$j_Owner

Owner of the Current Object
string

$j_CreatedOn

Date on which the object was created
string

$j_LastModified

Date on which the object was last modified
string

$j_Comments

current Comments (internal)
string

$j_Expires

Expiry Date
string

$j_Restrictions

Access Restrictions applying to current object
string

$j_lockedBy

Usewr that locked the current object
string

$j_lockStart

timestamp when object was locked extended ISO 8601 format "yyyy-mm-dd hh:mm:ss"
string

$j_Name

name of jpeto_type
string

$j_ClassName

Name of the Type's Class
string

$j_Subtable

Subtable to join from jpeto_type
string

$j_AccessLevel

AccessLevel of jpeto_type
integer

$j_Enabled

jpeto_type Enabled
integer

$j_Timeless

jpeto_type timeless
string

$j_Project

project
string

$ExtraQuery

ExtraQuery Parameter (Syntax: " AND isOnline = 1")
integer

$j_SortPos

SortPosition in jpeto_mapper
integer

$j_PrevJpetoType

JpetoType of previous Object (if in List)
integer

$j_NextJpetoType

JpetoType of next Object (if in List)
string

$CacheFile

Name of the current Object's Cachefile
string

$Content

Container for HTML of child-objects
string

$order

up or down
unknown

$P_Recordset

unknown

$P_Pointer

Included files inherited from jpeto_core

jpeto/jpeto_config.php, jpeto/jpeto_util.php, jpeto/jpeto_cache_manager.php

Included files Summary, Type: include_once

jpeto/jpeto_core.php Warning: documentation is missing.
jpeto/jpeto_user.php Warning: documentation is missing.
jpeto/jpeto_mapper.php Warning: documentation is missing.
j_ClassName.".php">jpeto/".$SubObject->j_ClassName.".php j_ClassName.".php">Warning: documentation is missing.
j_ClassName.".php">jpeto/".$tmp->j_ClassName.".php j_ClassName.".php">Warning: documentation is missing.

Public Method Details

jpeto_object

public void jpeto_object( [ integer $JpetoType, string $Language, string $Version ] )

  constructor for jpeto_object

Parameter
integer $JpetoType = >>0<<
the type of the current object
string $Language = >>"DE"<<
the Languagecode of the current object
string $Version = >>"O"<<
the Version of the current object
Returns void


get_next_jpeto_object

public boolean get_next_jpeto_object( )

  Gets the next object of a specific type for the defined Language and Version

Returns boolean

true if there is a next element
false if there is no next element

example

while($object->get_next_jpeto_object())
{
$object->toHTML();
}


Private Method Details

getIcon

private string getIcon( )

  Returns a complete img-tag for the searchresult

Returns string $html


createAdminInterface

private void createAdminInterface( int &$AdminInterface )

  sets the editable properties in the AdminInterface

Parameter
int &$AdminInterface
erface &$AdminInterface
Returns void


getFields

private array getFields( )

  returns all the fields of the database table associated with the object.
therefore is it necessary to name these fields (in the Globals section on top of the page)in a special way, f.i. in the class jpeto_article all the FIELDS should be namedarticle_FIELDNAME

Returns array $fields


getSubtype

private string getSubtype( )

  This function returns a SubObject (if there's just one)

Returns string $SubObject


getJpetoTypeDetails

private void getJpetoTypeDetails( integer $JpetoType )

  loads the details for the given JpetoType

Parameter
integer $JpetoType
Returns void


getJpetoType

private integer getJpetoType( integer $UniqueID )

  gets the JpetoType for a specified UniqueID

Parameter
integer $UniqueID
Returns integer $JpetoType


getJoin

private string getJoin( )

  returns a sql string for joining the object-table with the [JpetoType]-table

Returns string $where


isOnline

private Boolean isOnline( object jpeto_object $Object )

  returns the online status of an object (depending on the isOnline Flag, the OnlineStart & OnlineEnd)

Parameter
object jpeto_object $Object
Returns Boolean $isOnline

the status of the object


get_jpeto_object

private void get_jpeto_object( integer $UniqueID, [ Boolean $follow ] )

  Gets one object identified by it's UniqueID
and calls mapFields

Parameter
integer $UniqueID
the UniqueID of the object to fetch from the database
Boolean $follow = >>true<<
follow the object to it's leaves
Returns void


numChildren

private integer numChildren( )

  Returns the number of Child Objects

Returns integer $numChildren


isExpired

private boolean isExpired( )

  Boolean is Expired

Returns boolean $isExpired


isLocked

private boolean isLocked( )

  Boolean is Locked

Returns boolean $isLocked


lock

private boolean lock( )

  Locks the current object

Returns boolean $success


unlock

private boolean unlock( )

  Unlocks all objects locked by a specific user

Returns boolean $success


assignContent

private void assignContent( object jpeto_object $Object )

  This function assigns the content (by default into one column, with line-breaks as seperator)
For more complex objects, please overwrite this function in the subclass and assignthe Content identified by it's JpetoType to different Slots/etc.

Parameter
object jpeto_object $Object
Returns void


stripLastLinebreak

private void stripLastLinebreak( )

  removes the linebreak after the last object

Returns void


mapFields

private void mapFields( array $Recordset )

  Maps the fields of the given recordset to the object variables

Parameter
array $Recordset
the Recordset given to map to the variables
Returns void


mapTypeFields

private void mapTypeFields( array $Recordset )

  Maps the type-specific fields of the given recordset to the object-type variables

Parameter
array $Recordset
the Recordset given to map to the variables
Returns void


mapObjectFields

private void mapObjectFields( array $Recordset )

  Maps the fields of the given recordset to the object variables
This is just a dummy that should be overwritten by the extending class,if the object has got any data-fields beside the meta-data

Parameter
array $Recordset
the Recordset given to map to the variables
Returns void


newUniqueID

private int newUniqueID( )

  gets an unused UniqueID

Returns int $newUniqueID


debug

private void debug( )

  returns the elements of the object as a html table
overwrite function debugObject in extending class

Returns void


delete

private boolean delete( [ integer $UniqueID ] )

  deletes the current object identified by its UniqueID, Language, Version

Parameter
integer $UniqueID = >>0<<
Returns boolean $success


getOnlineStatusImage

private string getOnlineStatusImage( )

  Returns a image-tag to display the online status of an object

Returns string $String


getFromURLKey

private String getFromURLKey( )

  returns the primary key of the current object as From QueryString

Returns String $key


getToURLKey

private String getToURLKey( )

  returns the primary key of the current object as To QueryString

Returns String $key


addAdminLink

private string addAdminLink( string $Content )

  returns a link to the admin interface of the current object

Parameter
string $Content
Returns string $AdminLink


isCached

private boolean isCached( )

  Checks if the current object is already in cache

Returns boolean $isCached


getCacheFileName

private String getCacheFileName( )

  Returns a cache filename

Returns String $CacheFile


toCache

private void toCache( string $Content )

  Writes the given Content-String to the Cache Directory

Parameter
string $Content
Returns void


getCache

private string getCache( )

  returns the Cached Object

Returns string $Cache


purgeCache

private boolean purgeCache( )

  removes the object from the Cache

Returns boolean $success


store

private boolean store( )

  stores the current object
please overwrite updateObject() and insertObject()

Returns boolean $success


getDefaultValues

private void getDefaultValues( )

  gets default Values for (not set) parameters
This is just a dummy that should be overwritten by the extending class (optional)

Returns void


updateObject

private void updateObject( )

  updates the current object in the subtable
This is just a dummy that has to be overwritten by the extending class,depending on the fields of the extension

Returns void


insertObject

private void insertObject( )

  inserts the current object in the subtable
This is just a dummy that has to be overwritten by the extending class,depending on the fields of the extension

Returns void


addSubObject

private void addSubObject( object jpeto_object $SubObject )

  maps a given Subobject to the current Object

Parameter
object jpeto_object $SubObject
Returns void


isRestricted

private boolean isRestricted( )

  returns whether the access of the current object is restricted or not

Returns boolean $isRestricted


toHTML

private void toHTML( )

  returns the current object rendered as html
This is just a dummy that has to be overwritten by the extending class,depending on the way of presentation

Returns void


toDetailHTML

private void toDetailHTML( )

  returns the current object rendered in detail as html
This is just a dummy that should be overwritten by the extending class,depending on the way of presentation (optional)

Returns void


xmlFormat

private string xmlFormat( string $String )

  formats a string with xml entities

Parameter
string $String
Returns string $String


xmlElement

private string xmlElement( string $elementName )

  renders a string to xml

Parameter
string $elementName
Returns string $xmlE


toXML

private String toXML( )

  converts the current object into xml data

Returns String $xml


getBoundary

private String getBoundary( )

  returns a Unique Boundary ID for the current object

Returns String $Boundary


getContentID

private String getContentID( )

  returns a Unique Content ID for the current object

Returns String $ContentID


toPlainText

private string toPlainText( )

  returns a "stupid" plain text conversion of the current object.
if you've got a rather complex object, overwrite this function to get better results

Returns string $PlainText


getMailData

private String getMailData( )

  Converts HTML Code to Mail-conform HTML Code
Overwrite this function for Non-Text Objects like Images

Returns String $MailData


upgrade

private void upgrade( )

  upgrades an object of an unknown type to the complete object
example:$object = new jpeto_object ("", "DE", "O"); // we don't know which type of object!$object->j_UniqueID = 1234;$object->upgrade(); // now we have the complete object

Returns void


getOrigin

private String getOrigin( [ Integer $excludeJpetoType ] )

  this function returns the original URL of the current object. (the node to which the current object was mapped first)

Parameter
Integer $excludeJpetoType = >>0<<
the jpeto_type to exclude
Returns String $URL

the URL of the original node (or false)


Private Field Details

$j_UniqueID

private integer $j_UniqueID

>><<

unique identifier of current object


$o_UniqueID

private integer $o_UniqueID

>><<

unique identifier of current object (backup copy of $UniqueID)


$o_Language

private string $o_Language

>>"DE"<<

language of the current element (backup copy of $Language)


$o_Version

private string $o_Version

>>"O"<<

Version


$j_JpetoType

private integer $j_JpetoType

>><<

Type of current element


$j_OnlineStart

private string $j_OnlineStart

>>""<<

Date from which on the object is online


$j_OnlineEnd

private string $j_OnlineEnd

>>""<<

Date from which on the object is offline


$j_isOnline

private integer $j_isOnline

>>1<<

object is online (=1) or offline (=0)


$j_Owner

private string $j_Owner

>>""<<

Owner of the Current Object


$j_CreatedOn

private string $j_CreatedOn

>>""<<

Date on which the object was created


$j_LastModified

private string $j_LastModified

>>""<<

Date on which the object was last modified


$j_Comments

private string $j_Comments

>>""<<

current Comments (internal)


$j_Expires

private string $j_Expires

>>""<<

Expiry Date


$j_Restrictions

private string $j_Restrictions

>>""<<

Access Restrictions applying to current object


$j_lockedBy

private string $j_lockedBy

>>""<<

Usewr that locked the current object


$j_lockStart

private string $j_lockStart

>>""<<

timestamp when object was locked extended ISO 8601 format "yyyy-mm-dd hh:mm:ss"


$j_Name

private string $j_Name

>>""<<

name of jpeto_type


$j_ClassName

private string $j_ClassName

>>""<<

Name of the Type's Class


$j_Subtable

private string $j_Subtable

>>""<<

Subtable to join from jpeto_type


$j_AccessLevel

private string $j_AccessLevel

>>""<<

AccessLevel of jpeto_type


$j_Enabled

private integer $j_Enabled

>>1<<

jpeto_type Enabled


$j_Timeless

private integer $j_Timeless

>><<

jpeto_type timeless


$j_Project

private string $j_Project

>>""<<

project


$ExtraQuery

private string $ExtraQuery

>>""<<

ExtraQuery Parameter (Syntax: " AND isOnline = 1")


$j_SortPos

private integer $j_SortPos

>><<

SortPosition in jpeto_mapper


$j_PrevJpetoType

private integer $j_PrevJpetoType

>><<

JpetoType of previous Object (if in List)


$j_NextJpetoType

private integer $j_NextJpetoType

>><<

JpetoType of next Object (if in List)


$CacheFile

private string $CacheFile

>>""<<

Name of the current Object's Cachefile


$Content

private string $Content

>>""<<

Container for HTML of child-objects


$order

private string $order

>>""<<

up or down


$P_Recordset

private unknown $P_Recordset

>><<



$P_Pointer

private unknown $P_Pointer

>><<



Included Files, Type: include_once

jpeto/jpeto_core.php

include_once( jpeto/jpeto_core.php )



jpeto/jpeto_user.php

include_once( jpeto/jpeto_user.php )



jpeto/jpeto_mapper.php

include_once( jpeto/jpeto_mapper.php )



j_ClassName.".php">

jpeto/".$SubObject->j_ClassName.".php

include_once( jpeto/".$SubObject->j_ClassName.".php )



j_ClassName.".php">

jpeto/".$tmp->j_ClassName.".php

include_once( jpeto/".$tmp->j_ClassName.".php )




Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta