git.cweiske.de
/
phorkie.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix gist.github.com clone urls
[phorkie.git]
/
src
/
phorkie
/
Tool
/
Info.php
diff --git
a/src/phorkie/Tool/Info.php
b/src/phorkie/Tool/Info.php
index c1c3c696b30bb3ff6b9e580ecdf8fafb6214b84f..2e95a9f0364a3dd6ba1dd14c0fdb82bb0debda80 100644
(file)
--- a/
src/phorkie/Tool/Info.php
+++ b/
src/phorkie/Tool/Info.php
@@
-10,16
+10,35
@@
class Tool_Info
$this->class = $class;
}
$this->class = $class;
}
+ /**
+ * Format the tool path
+ *
+ * @param File $file
+ *
+ * @return string
+ */
public function getLink(File $file)
{
return $file->getLink('tool', $this->stripPrefix($this->class));
}
public function getLink(File $file)
{
return $file->getLink('tool', $this->stripPrefix($this->class));
}
+ /**
+ * Clean namespace from class
+ *
+ * @return string
+ */
public function getTitle()
{
return $this->stripPrefix($this->class);
}
public function getTitle()
{
return $this->stripPrefix($this->class);
}
+ /**
+ * Removes custom namespace prefix
+ *
+ * @param string $class Class of object
+ *
+ * @return string
+ */
protected function stripPrefix($class)
{
$prefix = '\\phorkie\\Tool_';
protected function stripPrefix($class)
{
$prefix = '\\phorkie\\Tool_';