Browse Source

Added Bundle::expand() method.

Signed-off-by: Pavel <proger.xp@gmail.com>
Pavel 12 years ago
parent
commit
524375781e
1 changed files with 12 additions and 0 deletions
  1. 12 0
      laravel/bundle.php

+ 12 - 0
laravel/bundle.php

@@ -451,4 +451,16 @@ class Bundle {
 		return array_keys(static::$bundles);
 		return array_keys(static::$bundles);
 	}
 	}
 
 
+	/**
+	 * Expand given bundle path of form "[bundle::]path/...".
+	 *
+	 * @param  string  $path
+	 * @return string
+	 */
+	public static function expand($path)
+	{
+		list($bundle, $element) = static::parse($path);
+		return static::path($bundle).$element;
+	}
+
 }
 }