public function addPrefix($prefix, $baseDirs, $prepend = FALSE) {

		$baseDirs	= (array) $baseDirs;
		
		// normalize the namespace prefix

		$prefix		= trim($prefix, '\\') . '\\';

		// initialize the namespace prefix array if needed

		if (! isset($this->prefixes[$prefix])) {
			$this->prefixes[$prefix] = [];
		}

		// normalize each base dir with a trailing separator
		
		foreach ($baseDirs as $ndx => $dir) {
			$baseDirs[$ndx] = rtrim($dir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
		}

		// prepend or append?

		$this->prefixes[$prefix] = $prepend ? array_merge($baseDirs, $this->prefixes[$prefix]) : $this->prefixes[$prefix] = array_merge($this->prefixes[$prefix], $baseDirs);

	}
public function addPrefix($prefix, $baseDirs, $prepend = FALSE) {

		$baseDirs	= (array) $baseDirs;
		
		// normalize the namespace prefix

		$prefix		= trim($prefix, '\\') . '\\';

		// initialize the namespace prefix array if needed

		if (! isset($this->prefixes[$prefix])) {
			$this->prefixes[$prefix] = [];
		}

		// normalize each base dir with a trailing separator
		
		foreach ($baseDirs as $ndx => $dir) {
			$baseDirs[$ndx] = rtrim($dir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
		}

		// prepend or append?

		$this->prefixes[$prefix] = $prepend ? array_merge($baseDirs, $this->prefixes[$prefix]) : $this->prefixes[$prefix] = array_merge($this->prefixes[$prefix], $baseDirs);

	}
public function addPrefix ( $ prefix , $ baseDirs , $ prepend = FALSE ) { $ baseDirs = ( array ) $ baseDirs ; // normalize the namespace prefix $ prefix = trim ( $ prefix , '\\' ) . '\\' ; // initialize the namespace prefix array if needed if ( ! isset ( $ this -> prefixes [ $ prefix ] ) ) { $ this -> prefixes [ $ prefix ] = [ ] ; } // normalize each base dir with a trailing separator foreach ( $ baseDirs as $ ndx => $ dir ) { $ baseDirs [ $ ndx ] = rtrim ( $ dir , DIRECTORY_SEPARATOR ) . DIRECTORY_SEPARATOR ; } // prepend or append? $ this -> prefixes [ $ prefix ] = $ prepend ? array_merge ( $ baseDirs , $ this -> prefixes [ $ prefix ] ) : $ this -> prefixes [ $ prefix ] = array_merge ( $ this -> prefixes [ $ prefix ] , $ baseDirs ) ; }
add a base directory for a namespace prefix

@param string $prefix
@param string|array $baseDirs: one or more base directories for the namespace prefix
@param bool $prepend: if true, prepend base directories to prefix instead of appending them;
this causes them to be searched first rather than last.

@return void
add a base directory for a namespace prefix