From: Roland Haeder Date: Mon, 19 May 2014 20:35:25 +0000 (+0200) Subject: Added initIndex(). X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=68196bdb8eb0308a8c117d78190c33c60f823287;p=core.git Added initIndex(). Signed-off-by: Roland Häder --- diff --git a/inc/classes/main/index/class_ b/inc/classes/main/index/class_ index 2f51d77c..b0aa6d96 100644 --- a/inc/classes/main/index/class_ +++ b/inc/classes/main/index/class_ @@ -42,6 +42,9 @@ class ???Index extends BaseIndex implements Indexable { // Get a new instance $indexInstance = new ???Index(); + // Initialize index + $indexInstance->initIndex($fileName); + // Return the prepared instance return $indexInstance; } diff --git a/inc/classes/main/index/class_BaseIndex.php b/inc/classes/main/index/class_BaseIndex.php index 25853eab..9d019528 100644 --- a/inc/classes/main/index/class_BaseIndex.php +++ b/inc/classes/main/index/class_BaseIndex.php @@ -32,6 +32,16 @@ class BaseIndex extends BaseFrameworkSystem { // Call parent constructor parent::__construct($className); } + + /** + * Initializes this file based index + * + * @param $fileName Name of the file to create an index for + * @return void + */ + protected function initIndex ($fileName) { + // @TODO + } } // [EOF] diff --git a/inc/classes/main/index/file_stack/class_FileStackIndex.php b/inc/classes/main/index/file_stack/class_FileStackIndex.php index faa79b06..aeb14644 100644 --- a/inc/classes/main/index/file_stack/class_FileStackIndex.php +++ b/inc/classes/main/index/file_stack/class_FileStackIndex.php @@ -42,6 +42,9 @@ class FileStackIndex extends BaseIndex implements IndexableStack { // Get a new instance $indexInstance = new FileStackIndex(); + // Initialize index + $indexInstance->initIndex($fileName); + // Return the prepared instance return $indexInstance; }