<?php
class Hdw {

	public function __construct() {

	}

	public function _file_last_modified($href) {
		$new_href = $href;
		$dir_application = str_replace('/catalog/', '/', DIR_APPLICATION);
		$file = $dir_application . $href;

		if (file_exists($file)) {
			$pathinfo = pathinfo($file);
			$date = date('YmdHis', @filemtime($file));
			$new_href = str_replace($pathinfo['basename'], "{$pathinfo['filename']}.{$date}.{$pathinfo['extension']}", $href);
		}

		return $new_href;
	}
}
