Skip to content

Commit

Permalink
[FrameworkBundle] added 2 helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Aug 27, 2010
1 parent 4ae8afe commit c78528a
Showing 1 changed file with 18 additions and 0 deletions.
Expand Up @@ -68,6 +68,24 @@ public function formatArgsAsText($args)
return implode(', ', $result);
}

public function abbrClass($class)
{
$parts = explode('\\', $class);
$short = array_pop($parts);

return sprintf("<abbr title=\"%s\">%s</abbr>", $class, $short);
}

public function abbrMethod($method)
{
list($class, $method) = explode('::', $method);

$parts = explode('\\', $class);
$short = array_pop($parts);

return sprintf("<abbr title=\"%s\">%s</abbr>::%s", $class, $short, $method);
}

/**
* Formats an array as a string.
*
Expand Down

0 comments on commit c78528a

Please sign in to comment.