Permalink
Browse files

Reflection: remove path prefix from ClassType::getFileName

  • Loading branch information...
1 parent 78511c5 commit 3a4a3f2de6404fc5ec8e5b2a8c3e2c376c00bb01 @juzna committed Aug 19, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 Nette/Reflection/ClassType.php
@@ -80,6 +80,12 @@ public function is($type)
return $this->isSubclassOf($type) || strcasecmp($this->getName(), ltrim($type, '\\')) === 0;
}
+ public function getFileName()
+ {
+ $path = parent::getFileName();
+ if (preg_match('~^enhance://~', $path)) return substr($path, 10);
+ else return $path;
@fprochazka

fprochazka Aug 19, 2012

return preg_replace('~^[^:]+://~', '', parent::getFileName());
+ }
/********************* Reflection layer ****************d*g**/

0 comments on commit 3a4a3f2

Please sign in to comment.