From 68196bdb8eb0308a8c117d78190c33c60f823287 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Mon, 19 May 2014 22:35:25 +0200 Subject: [PATCH] Added initIndex(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- inc/classes/main/index/class_ | 3 +++ inc/classes/main/index/class_BaseIndex.php | 10 ++++++++++ .../main/index/file_stack/class_FileStackIndex.php | 3 +++ 3 files changed, 16 insertions(+) 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; } -- 2.39.5