/**
	 * Read recursively path & sub-paths of xsl file
	 *
	 * @access private
	 * @param string $path the root path
	 * @param bool $searchTemplateName true if you want to recover templates names
	 * @param array &$arrayTemplateName reference array, it will contains templates names
	 * @param array &$arrayPath reference array, it will contains paths
	 * @param array &$arrayFilename reference array, it will contains filenames
	 * @since 1.0
	 */
	private function recursiveRead($path, $searchTemplateName=false, &$arrayTemplateName, &$arrayPath, &$arrayFilename)
	{ 
		if (substr($path, strlen($path)-1, 1) != "/")
			$path .= "/";
		if (@is_dir($path))
		{
			$handle = opendir($path);			
			while (false !== ($object = readdir($handle))) 
			{
				if (is_dir($path.$object) && substr($object, 0, 1) != ".") 
					$this->recursiveRead($path.$object, $searchTemplateName, $arrayTemplateName, $arrayPath, $arrayFilename);				
				if (substr($object, 0, 1) != "." && is_file($path.$object) && SLS_String::getFileExtension($object) == "xsl") 
				{
					if ($searchTemplateName)
					{
						$xslHandle = file_get_contents($path.$object);
						$boundContent = SLS_String::trimString(array_shift(SLS_String::getBoundContent($xslHandle, "<xsl:template", ">")));
						if (($stringName = stristr($boundContent, "name=")) === false)
						{
							array_push($arrayTemplateName, "");
						}
						else
						{
							$templateName = explode($stringName{5}, $stringName);
							array_push($arrayTemplateName, $templateName[1]);
						}
					}
					array_push($arrayPath, $path.$object);
					array_push($arrayFilename, $object);
				}		
			}
			closedir($handle);
		}
	}
	/**
	 * Read recursively path & sub-paths of js file
	 *
	 * @access private
	 * @param string $path the root path
	 * @param array &$arrayPath reference array, it will contains paths
	 * @param array &$arrayFilename reference array, it will contains filenames
	 * @param array $pathExclu array of ignore paths
	 * @since 1.0
	 */
	private function recursiveRead($path,&$arrayPath, &$arrayFilename, $pathExclu=array())
	{ 
		if (substr($path, strlen($path)-1, 1) != "/")
			$path .= "/";
				
		if (@is_dir($path))
		{
			$handle = opendir($path);			
			while (false !== ($object = readdir($handle))) 
			{
				if (is_dir($path.$object) && substr($object, 0, 1) != ".") 
					$this->recursiveRead($path.$object,$arrayPath, $arrayFilename,$pathExclu);				
				if (substr($object, 0, 1) != "." && is_file($path.$object) && SLS_String::getFileExtension($object) == "js" && !in_array($path, $pathExclu)) 
				{
					array_push($arrayPath, $path.$object.((!SLS_String::contains($object,"?")) ? "?".$this->_generic->getSiteConfig("versionName") : ""));
					array_push($arrayFilename, $object);
				}		
			}
			closedir($handle);
		}
	}