public static function getMeta($refobj) {
        $fname = $refobj->getFileName();
        $lines = file_get_contents($fname);
        $file = new \SplFileObject($fname);
        $file->seek($refobj->getStartLine() - 2);
        $spos = $file->ftell();
        $file->seek($refobj->getEndLine() - 1);
        $epos = $file->ftell();
        unset($file);
        return array(
            'name' => $refobj->getName(),
            'code' => substr($lines, $spos, $epos - $spos)
        );
    }
public static function getMeta($refobj) {
        $fname = $refobj->getFileName();
        $lines = file_get_contents($fname);
        $file = new \SplFileObject($fname);
        $file->seek($refobj->getStartLine() - 2);
        $spos = $file->ftell();
        $file->seek($refobj->getEndLine() - 1);
        $epos = $file->ftell();
        unset($file);
        return array(
            'name' => $refobj->getName(),
            'code' => substr($lines, $spos, $epos - $spos)
        );
    }
public static function getMeta ( $ refobj ) { $ fname = $ refobj -> getFileName ( ) ; $ lines = file_get_contents ( $ fname ) ; $ file = new \ SplFileObject ( $ fname ) ; $ file -> seek ( $ refobj -> getStartLine ( ) - 2 ) ; $ spos = $ file -> ftell ( ) ; $ file -> seek ( $ refobj -> getEndLine ( ) - 1 ) ; $ epos = $ file -> ftell ( ) ; unset ( $ file ) ; return array ( 'name' => $ refobj -> getName ( ) , 'code' => substr ( $ lines , $ spos , $ epos - $ spos ) ) ; }
Get metadata from ReflectionObject

@param object $refobj instance of the ReflectionObject

@return array
Get metadata from ReflectionObject