aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/phorkie/File.php3
-rw-r--r--src/phorkie/Repository/Post.php3
-rw-r--r--src/phorkie/Tool/Info.php19
3 files changed, 24 insertions, 1 deletions
diff --git a/src/phorkie/File.php b/src/phorkie/File.php
index f378f60..7f5b5b4 100644
--- a/src/phorkie/File.php
+++ b/src/phorkie/File.php
@@ -118,6 +118,9 @@ class File
throw new Exception('Unknown type');
}
+ /**
+ * @return string Mime type of file
+ */
public function getMimeType()
{
$ext = $this->getExt();
diff --git a/src/phorkie/Repository/Post.php b/src/phorkie/Repository/Post.php
index 9119e06..b181b5a 100644
--- a/src/phorkie/Repository/Post.php
+++ b/src/phorkie/Repository/Post.php
@@ -130,7 +130,8 @@ class Repository_Post
->setOption('message', $commitmsg)
->setOption('author', $sessionData['name'].' <'.$sessionData['email'].'>')
->execute();
- //FIXME: git needs ref BEFORE add. ideally VersionControl_Git needs to be updated
+ //FIXME: git needs ref BEFORE add
+ //quick hack until http://pear.php.net/bugs/bug.php?id=19605 is fixed
$vc->getCommand('notes --ref=identity add')
->setOption('force')
->setOption('message', "$notes")
diff --git a/src/phorkie/Tool/Info.php b/src/phorkie/Tool/Info.php
index c1c3c69..2e95a9f 100644
--- a/src/phorkie/Tool/Info.php
+++ b/src/phorkie/Tool/Info.php
@@ -10,16 +10,35 @@ class Tool_Info
$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));
}
+ /**
+ * Clean namespace from class
+ *
+ * @return string
+ */
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_';