src/utils/Code.php
public static function classfile($class, $comment = false)
	{
		$ref    = new \ReflectionClass($class);
		$start  = $ref->getStartLine();
		$end    = $ref->getEndLine();
		$text   = file_get_contents($ref->getFileName());
		$text   = self::lines($text, $start, $end);
		if ($comment)
		{
			$text = preg_replace('/^\s+\*/m', ' *', $ref->getDocComment()) . PHP_EOL . $text;
		}
		return self::output($text, 'php');
	}
public static function classfile($class, $comment = false)
	{
		$ref    = new \ReflectionClass($class);
		$start  = $ref->getStartLine();
		$end    = $ref->getEndLine();
		$text   = file_get_contents($ref->getFileName());
		$text   = self::lines($text, $start, $end);
		if ($comment)
		{
			$text = preg_replace('/^\s+\*/m', ' *', $ref->getDocComment()) . PHP_EOL . $text;
		}
		return self::output($text, 'php');
	}
public static function classfile ( $ class , $ comment = false ) { $ ref = new \ ReflectionClass ( $ class ) ; $ start = $ ref -> getStartLine ( ) ; $ end = $ ref -> getEndLine ( ) ; $ text = file_get_contents ( $ ref -> getFileName ( ) ) ; $ text = self :: lines ( $ text , $ start , $ end ) ; if ( $ comment ) { $ text = preg_replace ( '/^\s+\*/m' , ' *' , $ ref -> getDocComment ( ) ) . PHP_EOL . $ text ; } return self :: output ( $ text , 'php' ) ; }
Output the contents of a class

@param   string  $class
@param   bool    $comment
@return  string
Output the contents of a class