Go\Instrument\Transformer\MagicConstantTransformer::resolveFileName PHP Method

resolveFileName() public static method

Resolves file name from the cache directory to the real application root dir
public static resolveFileName ( string $fileName ) : string
$fileName string Absolute file name
return string Resolved file name
    public static function resolveFileName($fileName)
    {
        return str_replace(array(self::$rewriteToPath, DIRECTORY_SEPARATOR . '_proxies'), array(self::$rootPath, ''), $fileName);
    }

Usage Example

Beispiel #1
0
}
?>

<?php 
// Conditional block with source code of class
if ($example) {
    ?>
    <div class="panel panel-default">
      <div class="panel-heading">
          <a data-toggle="collapse" href="#collapseTwo">
             Source code of class
          </a></div>
      <div class="panel-body well panel-collapse collapse out" id="collapseTwo">
<?php 
    $refObject = new ReflectionObject($example);
    Highlighter::highlight(MagicConstantTransformer::resolveFileName($refObject->getFileName()));
    ?>
      </div>
    </div>
<?php 
    // End of conditional block with source code of class
}
?>
  </div><!-- /.accordion -->

</div><!-- /.container -->

    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>