XarayaTranslationMemory  1.6
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | List of all members
ProjectIterator Class Reference
Inheritance diagram for ProjectIterator:

Public Member Functions

 __construct ($parentID, $localeID, $brief=false)
 
 rewind ()
 
 hasMore ()
 
 key ()
 
 current ()
 
 next ()
 
 valid ()
 
 hasChildren ()
 
 getChildren ()
 

Static Public Member Functions

static ClearCache ($localeID)
 

Static Public Attributes

static $ProjectList
 
static $ProjectChildren
 

Private Attributes

 $LocaleID
 
 $ParentID
 
 $CurrentProject
 
 $Brief
 

Detailed Description

Class to list and iterate TranslationProject classes as they are stored in the database.

ProjectIterator can be initialized with a parent project id, and then it can be used to loop on child projects, either recursve or direct childs. ***** A 'PROJECT' IS ONE FILE IN XARAYA TERMS *****

Definition at line 29 of file ProjectIterator.php.

Constructor & Destructor Documentation

◆ __construct()

ProjectIterator::__construct (   $parentID,
  $localeID,
  $brief = false 
)

Create a new TranslationProject iterator for looping on child projects.

Parameters
$parentIDint The project ID in which we will loop child projects.
$localeIDint The locale to work with.
$briefbool True value will load partial project details, without Skeleton and Document.

Definition at line 54 of file ProjectIterator.php.

References $CONFIG, $DB, $LocaleID, GetDbConn(), GetTables(), and rewind().

Member Function Documentation

◆ ClearCache()

static ProjectIterator::ClearCache (   $localeID)
static

Clear cached ProjectList and ProjectChildren (both memory and disk).

Definition at line 141 of file ProjectIterator.php.

References $CONFIG, $ProjectChildren, and $ProjectList.

Referenced by TranslationProject\DestroyData(), TranslationExportXaraya\Export(), and TranslationImportXaraya\Import().

◆ current()

ProjectIterator::current ( )

Iterator interface: current function.

Definition at line 228 of file ProjectIterator.php.

References $LocaleID.

◆ getChildren()

ProjectIterator::getChildren ( )

Recursive Iterator: getChildren function

Definition at line 286 of file ProjectIterator.php.

Referenced by TranslationExportXaraya\ProcessRecursive().

◆ hasChildren()

ProjectIterator::hasChildren ( )

Recursive Iterator: hasChildren function

Definition at line 277 of file ProjectIterator.php.

Referenced by TranslationExportXaraya\ProcessRecursive().

◆ hasMore()

ProjectIterator::hasMore ( )

Iterator interface: hasMore function.

Definition at line 191 of file ProjectIterator.php.

References $LocaleID.

◆ key()

ProjectIterator::key ( )

Iterator interface: key function.

Definition at line 221 of file ProjectIterator.php.

◆ next()

ProjectIterator::next ( )

Iterator interface: next function.

Definition at line 235 of file ProjectIterator.php.

References $LocaleID.

◆ rewind()

ProjectIterator::rewind ( )

Iterator interface: rewind function.

Definition at line 176 of file ProjectIterator.php.

References $LocaleID, and $ParentID.

Referenced by __construct().

◆ valid()

ProjectIterator::valid ( )

Iterator interface: valid function.

Definition at line 267 of file ProjectIterator.php.

Member Data Documentation

◆ $Brief

ProjectIterator::$Brief
private

True value loads partial project details, without Skeleton and Document

Definition at line 40 of file ProjectIterator.php.

◆ $CurrentProject

ProjectIterator::$CurrentProject
private

ID of the current project in the Iterator.

Definition at line 37 of file ProjectIterator.php.

◆ $LocaleID

ProjectIterator::$LocaleID
private

Work with strings from this locale.

Definition at line 32 of file ProjectIterator.php.

Referenced by __construct(), current(), hasMore(), next(), and rewind().

◆ $ParentID

ProjectIterator::$ParentID
private

Start listing childs of this project.

Definition at line 34 of file ProjectIterator.php.

Referenced by rewind().

◆ $ProjectChildren

ProjectIterator::$ProjectChildren
static

Cached array to hold project tree data

Definition at line 45 of file ProjectIterator.php.

Referenced by ClearCache().

◆ $ProjectList

ProjectIterator::$ProjectList
static

Cached list of all available projects e.g. ProjectList[2][44] = a TranslationProject

Definition at line 43 of file ProjectIterator.php.

Referenced by TranslationExportXaraya\CheckCodeFiles(), and ClearCache().


The documentation for this class was generated from the following file: