|
|
|
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
|
| |
|
|
|
|
|
|
|
Fields inherited from jpeto_core |
| $j_language, $j_version, $j_jpetotype, $o_jpetotype, $adminmode, $islast, $isfirst, $recordset, $pointer, $subtype, $j_parentobject |
|
|
|
|
|
|
|
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 |
|
|
| Returns |
integer $SortPos |
|
get_mapped_item |
|
private void get_mapped_item( integer $SortPos )
|
| |
gets a mapped item identified by its SortPosition
|
| Parameter |
|
|
| 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
|
|
|
|
|
|
|
|
| PHPDoc 1.0beta |