PHP Class PHPPM\Utils

Afficher le fichier Open project: php-pm/php-pm Class Usage Examples

Méthodes publiques

Méthode Description
bindAndCall ( callable $fn, object $newThis, array $args = [], string $bindClass = null ) Executes a function in the context of an object. This basically bypasses the private/protected check of PHP.
generateSessionId ( ) : string Generates stronger session ids for session handling.
getMaxMemory ( ) : integer
hijackProperty ( object $object, string $propertyName, mixed $newValue ) Changes a property value of an object. (hijack because you can also change private/protected properties)
isWindows ( ) : boolean

Method Details

bindAndCall() public static méthode

Executes a function in the context of an object. This basically bypasses the private/protected check of PHP.
public static bindAndCall ( callable $fn, object $newThis, array $args = [], string $bindClass = null )
$fn callable
$newThis object
$args array
$bindClass string

generateSessionId() public static méthode

Generates stronger session ids for session handling.
public static generateSessionId ( ) : string
Résultat string

getMaxMemory() public static méthode

public static getMaxMemory ( ) : integer
Résultat integer bytes

hijackProperty() public static méthode

Changes a property value of an object. (hijack because you can also change private/protected properties)
public static hijackProperty ( object $object, string $propertyName, mixed $newValue )
$object object
$propertyName string
$newValue mixed

isWindows() public static méthode

public static isWindows ( ) : boolean
Résultat boolean