Moodle PHP Documentation 4.1
Moodle 4.1.19+ (Build: 20250706) (3342f23b299)
Box\Spout\Common\Helper\GlobalFunctionsHelper Class Reference

Public Member Functions

 basename ($path, $suffix='')
 Wrapper around global function basename()
 
 fclose ($handle)
 Wrapper around global function fclose()
 
 feof ($handle)
 Wrapper around global function feof()
 
 fflush ($handle)
 Wrapper around global function fflush()
 
 fgetcsv ($handle, $length=null, $delimiter=null, $enclosure=null)
 Wrapper around global function fgetcsv()
 
 fgets ($handle, $length=null)
 Wrapper around global function fgets()
 
 file_exists ($fileName)
 Wrapper around global function file_exists()
 
 file_get_contents ($filePath)
 Wrapper around global function file_get_contents()
 
 fopen ($fileName, $mode)
 Wrapper around global function fopen()
 
 fputcsv ($handle, array $fields, $delimiter=null, $enclosure=null)
 Wrapper around global function fputcsv()
 
 fputs ($handle, $string)
 Wrapper around global function fputs()
 
 fseek ($handle, $offset)
 Wrapper around global function fseek()
 
 function_exists ($functionName)
 Wrapper around global function function_exists()
 
 fwrite ($handle, $string)
 Wrapper around global function fwrite()
 
 header ($string)
 Wrapper around global function header()
 
 iconv ($string, $sourceEncoding, $targetEncoding)
 Wrapper around global function iconv()
 
 is_readable ($fileName)
 Wrapper around global function is_readable()
 
 mb_convert_encoding ($string, $sourceEncoding, $targetEncoding)
 Wrapper around global function mb_convert_encoding()
 
 ob_end_clean ()
 Wrapper around global function ob_end_clean()
 
 rewind ($handle)
 Wrapper around global function rewind()
 
 stream_get_wrappers ()
 Wrapper around global function stream_get_wrappers()
 

Protected Member Functions

 convertToUseRealPath ($filePath)
 Updates the given file path to use a real path.
 
 isZipStream ($path)
 Returns whether the given path is a zip stream.
 

Member Function Documentation

◆ basename()

Box\Spout\Common\Helper\GlobalFunctionsHelper::basename ( $path,
$suffix = '' )

Wrapper around global function basename()

See also
basename()
Parameters
string$path
string$suffix
Return values
string

◆ convertToUseRealPath()

Box\Spout\Common\Helper\GlobalFunctionsHelper::convertToUseRealPath ( $filePath)
protected

Updates the given file path to use a real path.

This is to avoid issues on some Windows setup.

Parameters
string$filePathFile path
Return values
stringThe file path using a real path

◆ fclose()

Box\Spout\Common\Helper\GlobalFunctionsHelper::fclose ( $handle)

Wrapper around global function fclose()

See also
fclose()
Parameters
resource$handle
Return values
bool

◆ feof()

Box\Spout\Common\Helper\GlobalFunctionsHelper::feof ( $handle)

Wrapper around global function feof()

See also
feof()
Parameters
resource$handle
Return values
bool

◆ fflush()

Box\Spout\Common\Helper\GlobalFunctionsHelper::fflush ( $handle)

Wrapper around global function fflush()

See also
fflush()
Parameters
resource$handle
Return values
bool

◆ fgetcsv()

Box\Spout\Common\Helper\GlobalFunctionsHelper::fgetcsv ( $handle,
$length = null,
$delimiter = null,
$enclosure = null )

Wrapper around global function fgetcsv()

See also
fgetcsv()
Parameters
resource$handle
int | null$length
string | null$delimiter
string | null$enclosure
Return values
array|false

◆ fgets()

Box\Spout\Common\Helper\GlobalFunctionsHelper::fgets ( $handle,
$length = null )

Wrapper around global function fgets()

See also
fgets()
Parameters
resource$handle
int | null$length
Return values
string

◆ file_exists()

Box\Spout\Common\Helper\GlobalFunctionsHelper::file_exists ( $fileName)

Wrapper around global function file_exists()

See also
file_exists()
Parameters
string$fileName
Return values
bool

◆ file_get_contents()

Box\Spout\Common\Helper\GlobalFunctionsHelper::file_get_contents ( $filePath)

Wrapper around global function file_get_contents()

See also
file_get_contents()
Parameters
string$filePath
Return values
string

◆ fopen()

Box\Spout\Common\Helper\GlobalFunctionsHelper::fopen ( $fileName,
$mode )

Wrapper around global function fopen()

See also
fopen()
Parameters
string$fileName
string$mode
Return values
resource|bool

◆ fputcsv()

Box\Spout\Common\Helper\GlobalFunctionsHelper::fputcsv ( $handle,
array $fields,
$delimiter = null,
$enclosure = null )

Wrapper around global function fputcsv()

See also
fputcsv()
Parameters
resource$handle
array$fields
string | null$delimiter
string | null$enclosure
Return values
int

◆ fputs()

Box\Spout\Common\Helper\GlobalFunctionsHelper::fputs ( $handle,
$string )

Wrapper around global function fputs()

See also
fputs()
Parameters
resource$handle
string$string
Return values
int

◆ fseek()

Box\Spout\Common\Helper\GlobalFunctionsHelper::fseek ( $handle,
$offset )

Wrapper around global function fseek()

See also
fseek()
Parameters
resource$handle
int$offset
Return values
int

◆ function_exists()

Box\Spout\Common\Helper\GlobalFunctionsHelper::function_exists ( $functionName)

Wrapper around global function function_exists()

See also
function_exists()
Parameters
string$functionName
Return values
bool

◆ fwrite()

Box\Spout\Common\Helper\GlobalFunctionsHelper::fwrite ( $handle,
$string )

Wrapper around global function fwrite()

See also
fwrite()
Parameters
resource$handle
string$string
Return values
int

◆ header()

Box\Spout\Common\Helper\GlobalFunctionsHelper::header ( $string)

Wrapper around global function header()

See also
header()
Parameters
string$string
Return values
void

◆ iconv()

Box\Spout\Common\Helper\GlobalFunctionsHelper::iconv ( $string,
$sourceEncoding,
$targetEncoding )

Wrapper around global function iconv()

See also
iconv()
Parameters
string$stringThe string to be converted
string$sourceEncodingThe encoding of the source string
string$targetEncodingThe encoding the source string should be converted to
Return values
string|boolthe converted string or FALSE on failure.

◆ is_readable()

Box\Spout\Common\Helper\GlobalFunctionsHelper::is_readable ( $fileName)

Wrapper around global function is_readable()

See also
is_readable()
Parameters
string$fileName
Return values
bool

◆ isZipStream()

Box\Spout\Common\Helper\GlobalFunctionsHelper::isZipStream ( $path)
protected

Returns whether the given path is a zip stream.

Parameters
string$pathPath pointing to a document
Return values
boolTRUE if path is a zip stream, FALSE otherwise

◆ mb_convert_encoding()

Box\Spout\Common\Helper\GlobalFunctionsHelper::mb_convert_encoding ( $string,
$sourceEncoding,
$targetEncoding )

Wrapper around global function mb_convert_encoding()

See also
mb_convert_encoding()
Parameters
string$stringThe string to be converted
string$sourceEncodingThe encoding of the source string
string$targetEncodingThe encoding the source string should be converted to
Return values
string|boolthe converted string or FALSE on failure.

◆ ob_end_clean()

Box\Spout\Common\Helper\GlobalFunctionsHelper::ob_end_clean ( )

Wrapper around global function ob_end_clean()

See also
ob_end_clean()
Return values
void

◆ rewind()

Box\Spout\Common\Helper\GlobalFunctionsHelper::rewind ( $handle)

Wrapper around global function rewind()

See also
rewind()
Parameters
resource$handle
Return values
bool

◆ stream_get_wrappers()

Box\Spout\Common\Helper\GlobalFunctionsHelper::stream_get_wrappers ( )

Wrapper around global function stream_get_wrappers()

See also
stream_get_wrappers()
Return values
array

The documentation for this class was generated from the following file: