+ function getFile($relative)
+ {
+ return $this->dir.'/'.$relative;
+ }
+
+ /**
+ * Gets the full HTTP url of a file in this theme
+ *
+ * @param string $relative relative name, like 'logo.png'
+ *
+ * @return string full URL, like 'http://example.com/theme/default/logo.png'
+ */
+
+ function getPath($relative)
+ {
+ return $this->path.'/'.$relative;
+ }
+
+ /**
+ * Gets the full path of a file in a theme dir based on its relative name
+ *
+ * @param string $relative relative path within the theme directory
+ * @param string $name name of the theme; defaults to current theme
+ *
+ * @return string File path to the theme file
+ */
+
+ static function file($relative, $name=null)
+ {
+ $theme = new Theme($name);
+ return $theme->getFile($relative);
+ }
+
+ /**
+ * Gets the full URL of a file in a theme dir based on its relative name
+ *
+ * @param string $relative relative path within the theme directory
+ * @param string $name name of the theme; defaults to current theme
+ *
+ * @return string URL of the file
+ */
+
+ static function path($relative, $name=null)
+ {
+ $theme = new Theme($name);
+ return $theme->getPath($relative);