cleaning up various codes.

This commit is contained in:
Taylor Otwell
2012-02-06 19:59:07 -06:00
parent 78dc4529f1
commit 007863a6fa
5 changed files with 9 additions and 18 deletions

View File

@@ -79,9 +79,8 @@ abstract class Controller {
protected static function backreference($method, $parameters)
{
// Controller delegates may use back-references to the action parameters,
// which allows the developer to setup more flexible rouets to their
// controllers with less code. We will replace the back-references
// with their corresponding parameter value.
// which allows the developer to setup more flexible routes to various
// controllers with much less code than usual.
foreach ($parameters as $key => $value)
{
$method = str_replace('(:'.($key + 1).')', $value, $method, $count);
@@ -158,13 +157,7 @@ abstract class Controller {
*/
protected static function format($bundle, $controller)
{
// If the controller's bundle is not the application bundle, we will
// prepend the bundle to the identifier so the bundle is prefixed to
// the class name when it is formatted. Bundle controllers are
// always prefixed with the bundle name.
if ($bundle !== DEFAULT_BUNDLE) $controller = $bundle.'.'.$controller;
return Str::classify($controller).'_Controller';
return Bundle::class_prefix($bundle).Str::classify($controller).'_Controller';
}
/**