public function createIndex($moduleName, $pageId, $exclude = array(),
                                $_defaultPath = self::FOLDER_PATH)
    {
        $this->tmpLogs = '';

        $pageContent = '';
        $folderPath = $_defaultPath . $moduleName;
        $lucenePath = $folderPath. '/' .self::FOLDER_NAME;

        // check if the module exists
        if(file_exists($folderPath)) {
            // check if the path exists
            if(!file_exists($lucenePath)) {

                $this->createDir($lucenePath);

                $this->tmpLogs = $this->createIndexForPages($lucenePath, $pageId, $exclude);
            }
            else {
                $this->changePermission($lucenePath);

                $this->tmpLogs = $this->createIndexForPages($lucenePath, $pageId, $exclude);

            }
        }


        return $this->tmpLogs;
    }
public function createIndex($moduleName, $pageId, $exclude = array(),
                                $_defaultPath = self::FOLDER_PATH)
    {
        $this->tmpLogs = '';

        $pageContent = '';
        $folderPath = $_defaultPath . $moduleName;
        $lucenePath = $folderPath. '/' .self::FOLDER_NAME;

        // check if the module exists
        if(file_exists($folderPath)) {
            // check if the path exists
            if(!file_exists($lucenePath)) {

                $this->createDir($lucenePath);

                $this->tmpLogs = $this->createIndexForPages($lucenePath, $pageId, $exclude);
            }
            else {
                $this->changePermission($lucenePath);

                $this->tmpLogs = $this->createIndexForPages($lucenePath, $pageId, $exclude);

            }
        }


        return $this->tmpLogs;
    }
public function createIndex ( $ moduleName , $ pageId , $ exclude = array ( ) , $ _defaultPath = self :: FOLDER_PATH ) { $ this -> tmpLogs = '' ; $ pageContent = '' ; $ folderPath = $ _defaultPath . $ moduleName ; $ lucenePath = $ folderPath . '/' . self :: FOLDER_NAME ; // check if the module exists if ( file_exists ( $ folderPath ) ) { // check if the path exists if ( ! file_exists ( $ lucenePath ) ) { $ this -> createDir ( $ lucenePath ) ; $ this -> tmpLogs = $ this -> createIndexForPages ( $ lucenePath , $ pageId , $ exclude ) ; } else { $ this -> changePermission ( $ lucenePath ) ; $ this -> tmpLogs = $ this -> createIndexForPages ( $ lucenePath , $ pageId , $ exclude ) ; } } return $ this -> tmpLogs ; }
Create index for the provided page id

@param string $moduleName
@param int $pageId
@param string[] $exclude
@param string|optional $_defaultPath
Create index for the provided page id