<?php


class egScript {

	var $scriptsFiles;
	var $script;

	function egScript() {
	  $this->scriptsFiles = array();
	  $this->script = '';
	}
    
	function getClassName() {
	  return "egScript";
	}
	
	function addLine($line) {
	  $this->script .= $line;
	}
	
	function addFile($file, $browser = 'default', $major = 'default', $minor = 'default', $build = 'default', $revision = 'default') {
		if($browser != 'default') {
			if($major != 'default') {
				if($minor != 'default') {
					if($build != 'default') {
						$this->scriptsFiles[$browser][$major][$minor][$build][$revision] = $file;
					}
					else {
						$this->scriptsFiles[$browser][$major][$minor][$build] = $file;
					}
				}
				else {
					$this->scriptsFiles[$browser][$major][$minor] = $file;
				}
			}
			else {
				$this->scriptsFiles[$browser][$major] = $file;
			}
		}
		else {
			$this->scriptsFiles[$browser] = $file;
		}
	}

	function getScriptsFiles() {
		return $this->scriptsFiles;
	}
	
	function getScript() {
	  return $this->script;
	}
}
?>