some small refactorings and cleanup.

This commit is contained in:
Taylor Otwell
2011-10-22 23:25:07 -05:00
parent b71ecb4363
commit 32989d39c8
9 changed files with 45 additions and 51 deletions

View File

@@ -3,29 +3,16 @@
class Blade {
/**
* Rewrites the specified file containing Blade pseudo-code into valid PHP.
* Compiles the specified file containing Blade pseudo-code into valid PHP.
*
* @param string $path
* @return string
*/
public static function parse($path)
public static function compile($path)
{
return static::parse_string(file_get_contents($path));
}
$value = file_get_contents($path);
/**
* Rewrites the specified string containing Blade pseudo-code into valid PHP.
*
* @param string $value
* @return string
*/
public static function parse_string($value)
{
$value = static::echos($value);
$value = static::openings($value);
$value = static::closings($value);
return $value;
return static::closings(static::openings(static::echos($value)));
}
/**