public function setExtension($extension) {
		$pathinfo = pathinfo($this->pathname);
		
		$pathname = new Text($pathinfo['dirname']);
		if (!empty($pathinfo['dirname'])) {
			$pathname = $pathname->append('/');
		}
		
		$this->init($pathname
			->append($pathinfo['filename'])
			->append('.')
			->append($extension))
		;

		return $this;
	}
public function setExtension($extension) {
		$pathinfo = pathinfo($this->pathname);
		
		$pathname = new Text($pathinfo['dirname']);
		if (!empty($pathinfo['dirname'])) {
			$pathname = $pathname->append('/');
		}
		
		$this->init($pathname
			->append($pathinfo['filename'])
			->append('.')
			->append($extension))
		;

		return $this;
	}
public function setExtension ( $ extension ) { $ pathinfo = pathinfo ( $ this -> pathname ) ; $ pathname = new Text ( $ pathinfo [ 'dirname' ] ) ; if ( ! empty ( $ pathinfo [ 'dirname' ] ) ) { $ pathname = $ pathname -> append ( '/' ) ; } $ this -> init ( $ pathname -> append ( $ pathinfo [ 'filename' ] ) -> append ( '.' ) -> append ( $ extension ) ) ; return $ this ; }
Changes the extension of this path

@param string $extension the new extension
@return $this
Changes the extension of this path