Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: c:/web/jpeto2/jpeto/jpeto_mapper.php
JPETo - James's Publishing & Editing Tool - jpeto_system

jpeto_mapper

jpeto_core
   |
  +-- jpeto_mapper

This class provides the functionality for the jpeto_mapper table

 

private class jpeto_mapper extends jpeto_core

This class provides the functionality for the jpeto_mapper table

 

Methods inherited from jpeto_core

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

Public Method Summary

void

jpeto_mapper([ integer $UniqueID, string $Language, string $Version ])

constructor for jpeto_mapper
boolean

get_next_mapped_item([ boolean $all ])

Gets the next element mapped to the object with the specified UniqueID, Language and Version
boolean

get_next_mapped_jpeto_type()

Gets the next Unique JpetoType

Private Method Summary

string

get_next_mapped_object([ Boolean $follow ])

Does the same as the function above, but returns the object
integer

arrange(integer $SortPos)

kills "holes" in mapping array. returns new position of given SortPos
void

get_mapped_item(integer $SortPos)

gets a mapped item identified by its SortPosition
void

mapObject(array $Recordset, [ Boolean $follow ])

Maps the Object specific Fields from the given Recordset to
void

mapFields(array $Recordset)

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

numParents()

Returns the number of Parent Objects
integer

newUniqueID()

gets an unused UniqueID
integer

newSortPos()

gets an unused SortPosition
boolean

store()

stores the current object
boolean

delete([ boolean $mapperonly ])

unlinks current object

Fields inherited from jpeto_core

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

Private Field Summary

integer

$mapUniqueID

UniqueID of the object to map from
string

$mapLanguage

language of the object to map from (2 character language code, default "DE")
string

$mapVersion

Version of the object to map from
integer

$mapJpetoType

Type of object to map from
integer

$mapToUniqueID

UniqueID of the object to map to
string

$mapToLanguage

language of the object to map to (2 character language code, default "DE")
string

$mapToVersion

Version of the object to map to
integer

$mapToJpetoType

Type of object to map to
integer

$mapSortPos

Sort Position object to map to
string

$order

up or down

Included files inherited from jpeto_core

jpeto/jpeto_util.php, jpeto/jpeto_cache_manager.php

Included files Summary, Type: include_once

jpeto/jpeto_config.php Warning: documentation is missing.
jpeto/jpeto_core.php Warning: documentation is missing.
jpeto/jpeto_object.php Warning: documentation is missing.
jpeto/".$Recordset[11].".php Warning: documentation is missing.

Public Method Details

jpeto_mapper

public void jpeto_mapper( [ integer $UniqueID, string $Language, string $Version ] )

  constructor for jpeto_mapper

Parameter
integer $UniqueID = >>0<<
the UniqueID of the object to map from
string $Language = >>"DE"<<
the current Language
string $Version = >>"O"<<
the current Version
Returns void


get_next_mapped_item

public boolean get_next_mapped_item( [ boolean $all ] )

  Gets the next element mapped to the object with the specified UniqueID, Language and Version

Parameter
boolean $all = >>false<<
affect all objects or just online objects
Returns boolean

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

example

while($mapper->get_next_mapped_item())
{
// do whatever you like with the object pair
}


get_next_mapped_jpeto_type

public boolean get_next_mapped_jpeto_type( )

  Gets the next Unique JpetoType

Returns boolean

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


Private Method Details

get_next_mapped_object

private string get_next_mapped_object( [ Boolean $follow ] )

  Does the same as the function above, but returns the object

Parameter
Boolean $follow = >>true<<
follow the object to it's leaves
Returns string $Object

returns the object (as an object, not as a string... phpdoc....)


arrange

private integer arrange( integer $SortPos )

  kills "holes" in mapping array. returns new position of given SortPos

Parameter
integer $SortPos
Returns integer $SortPos


get_mapped_item

private void get_mapped_item( integer $SortPos )

  gets a mapped item identified by its SortPosition

Parameter
integer $SortPos
Returns void


mapObject

private void mapObject( array $Recordset, [ Boolean $follow ] )

  Maps the Object specific Fields from the given Recordset to
the Object's variables

Parameter
array $Recordset
the Recordset to map to the Object's variables
Boolean $follow = >>true<<
follow the object to it's leaves
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


numParents

private integer numParents( )

  Returns the number of Parent Objects

Returns integer $numParents


newUniqueID

private integer newUniqueID( )

  gets an unused UniqueID

Returns integer $newUniqueID


newSortPos

private integer newSortPos( )

  gets an unused SortPosition

Returns integer $newSortPos


store

private boolean store( )

  stores the current object

Returns boolean $success


delete

private boolean delete( [ boolean $mapperonly ] )

  unlinks current object

Parameter
boolean $mapperonly = >>false<<
defines if just this one item should be deleted (e.g. for sorting) or all depending objects as well
Returns boolean $success


Private Field Details

$mapUniqueID

private integer $mapUniqueID

>><<

UniqueID of the object to map from


$mapLanguage

private string $mapLanguage

>>"DE"<<

language of the object to map from (2 character language code, default "DE")


$mapVersion

private string $mapVersion

>>"O"<<

Version of the object to map from


$mapJpetoType

private integer $mapJpetoType

>><<

Type of object to map from


$mapToUniqueID

private integer $mapToUniqueID

>><<

UniqueID of the object to map to


$mapToLanguage

private string $mapToLanguage

>>"DE"<<

language of the object to map to (2 character language code, default "DE")


$mapToVersion

private string $mapToVersion

>>"O"<<

Version of the object to map to


$mapToJpetoType

private integer $mapToJpetoType

>><<

Type of object to map to


$mapSortPos

private integer $mapSortPos

>><<

Sort Position object to map to


$order

private string $order

>>""<<

up or down


Included Files, Type: include_once

jpeto/jpeto_config.php

include_once( jpeto/jpeto_config.php )



jpeto/jpeto_core.php

include_once( jpeto/jpeto_core.php )



jpeto/jpeto_object.php

include_once( jpeto/jpeto_object.php )



jpeto/".$Recordset[11].".php

include_once( jpeto/".$Recordset[11].".php )




Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta