Commits

Toro Hill committed f19250d

Update to use static instead of self for static variables and methods.

Comments (0)

Files changed (1)

PhpTemplate/Template.php

 	 */
 	protected function getFileName($file){
 		$path = '';
-		if(!is_null(self::$config['path']) && '/' !== substr($file, 0, 1)){
-			$path .= self::$config['path'];
+		if(!is_null(static::$config['path']) && '/' !== substr($file, 0, 1)){
+			$path .= static::$config['path'];
 
 			if('/' !== substr($path, -1)){
 				$path .= '/';
 			}
 		}
 		$path .= $file;
-		if(!is_null(self::$config['suffix']) 
-			&& self::$config['suffix'] !== substr($path, -strlen(self::$config['suffix']))){
+		if(!is_null(static::$config['suffix']) 
+			&& static::$config['suffix'] !== substr($path, -strlen(static::$config['suffix']))){
 
-			$path .= self::$config['suffix'];
+			$path .= static::$config['suffix'];
 		}
 		return $path;
 	}
 	 * @return	void
 	 */
 	public static function setConfig(array $config){
-		self::$config = array_merge(self::$config, $config);
+		static::$config = array_merge(static::$config, $config);
 	}
 
 	/**
 	 * @return	string			Output from executing the template file.
 	 */ 
 	protected function subRender($file, array $vars=array()){
-		return self::render($file, self::mergeVars($this->vars, $vars));
+		return $this->render($file, static::mergeVars($this->vars, $vars));
 	}
 
 	/**
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.