PHP Class Zephir\Utils

Utility functions
Afficher le fichier Open project: phalcon/zephir Class Usage Examples

Méthodes publiques

Méthode Description
addSlashes ( string $str, boolean $escapeSlash = false ) : string Prepares a string to be used as a C-string
camelize ( string $str ) : string Camelize a string
checkAndWriteIfNeeded ( $content, $path ) : boolean Checks if the content of the file on the disk is the same as the content.
escapeClassName ( string $className ) : string Prepares a class name to be used as a C-string
getFullName ( string $className, string $currentNamespace, zephir\AliasManager $aliasManager = null ) : string Transform class/interface name to FQN format
isBsd ( ) : boolean Check if the host OS is BSD based
isMacOs ( ) : boolean Check if the host OS is MacOs
isWindows ( ) : boolean Check if the host OS is windows

Method Details

addSlashes() public static méthode

Prepares a string to be used as a C-string
public static addSlashes ( string $str, boolean $escapeSlash = false ) : string
$str string
$escapeSlash boolean
Résultat string

camelize() public static méthode

Camelize a string
public static camelize ( string $str ) : string
$str string
Résultat string

checkAndWriteIfNeeded() public static méthode

Checks if the content of the file on the disk is the same as the content.
public static checkAndWriteIfNeeded ( $content, $path ) : boolean
$content
$path
Résultat boolean

escapeClassName() public static méthode

Prepares a class name to be used as a C-string
public static escapeClassName ( string $className ) : string
$className string
Résultat string

getFullName() public static méthode

Transform class/interface name to FQN format
public static getFullName ( string $className, string $currentNamespace, zephir\AliasManager $aliasManager = null ) : string
$className string
$currentNamespace string
$aliasManager zephir\AliasManager
Résultat string

isBsd() public static méthode

Check if the host OS is BSD based
public static isBsd ( ) : boolean
Résultat boolean

isMacOs() public static méthode

Check if the host OS is MacOs
public static isMacOs ( ) : boolean
Résultat boolean

isWindows() public static méthode

Check if the host OS is windows
public static isWindows ( ) : boolean
Résultat boolean