lib/private/TemplateLayout.php
/**
	 * Converts the absolute file path to a relative path from \OC::$SERVERROOT
	 * @param string $filePath Absolute path
	 * @return string Relative path
	 * @throws \Exception If $filePath is not under \OC::$SERVERROOT
	 */
Converts the absolute file path to a relative path from \OC::$SERVERROOT
@param string $filePath Absolute path
@return string Relative path
@throws \Exception If $filePath is not under \OC::$SERVERROOT
Converts the absolute file path to a relative path from \ OC :: $SERVERROOT @param string $filePath Absolute path @return string Relative path @throws \ Exception If $filePath is not under \ OC :: $SERVERROOT
public static function convertToRelativePath($filePath) {
		$relativePath = explode(\OC::$SERVERROOT, $filePath);
		if(count($relativePath) !== 2) {
			throw new \Exception('$filePath is not under the \OC::$SERVERROOT');
		}
		return $relativePath[1];
	}
public static function convertToRelativePath ( $ filePath ) { $ relativePath = explode ( \ OC :: $ SERVERROOT , $ filePath ) ; if ( count ( $ relativePath ) !== 2 ) { throw new \ Exception ( '$filePath is not under the \OC::$SERVERROOT' ) ; } return $ relativePath [ 1 ] ; }
Converts the absolute file path to a relative path from \OC::$SERVERROOT
 @param string $filePath Absolute path
 @return string Relative path
 @throws \Exception If $filePath is not under \OC::$SERVERROOT
Converts the absolute file path to a relative path from \ OC :: $SERVERROOT @param string $filePath Absolute path @return string Relative path @throws \ Exception If $filePath is not under \ OC :: $SERVERROOT