Documentation

Helpers

User Extended by Shawn Clake Class Helpers User Extended is licensed under the MIT license.

Tags
author

Shawn Clake shawn.clake@gmail.com

link
https://github.com/ShawnClake/UserExtended
license

https://github.com/ShawnClake/UserExtended/blob/master/LICENSE MIT

Table of Contents

arrayKeyToVal()  : mixed|string
Returns the value at a key in an array or a default value if that key is empty or doesn't exist
deleteModel()  : mixed
Uses the desired delete type. Useful in cases where you need to dynamically determine whether a model should be hard deleted or soft deleted
file()  : mixed
Returns a files contents specififed by $path
hiBit()  : int
Returns an int with the highest bit in input as the only bit which is set Function example taken from Hacker's Delight
isBitSet()  : bool
Returns true if $bit is set inside of $bits Both $bits and $bit are integers Returns false if the bit is not set
unlimited()  : int
Returns the max int which SQL can handle. This is useful for returning 'unlimited' results

Methods

arrayKeyToVal()

Returns the value at a key in an array or a default value if that key is empty or doesn't exist

public static arrayKeyToVal(array<string|int, mixed> $array,  $key[, string $default = '' ]) : mixed|string
Parameters
$array : array<string|int, mixed>
$key :
$default : string = ''
Return values
mixed|string

deleteModel()

Uses the desired delete type. Useful in cases where you need to dynamically determine whether a model should be hard deleted or soft deleted

public static deleteModel( $model[, bool $forceDelete = false ]) : mixed
Parameters
$model :
$forceDelete : bool = false
Return values
mixed

file()

Returns a files contents specififed by $path

public static file( $path) : mixed
Parameters
$path :
Return values
mixed

hiBit()

Returns an int with the highest bit in input as the only bit which is set Function example taken from Hacker's Delight

public static hiBit( $n) : int
Parameters
$n :
Return values
int

isBitSet()

Returns true if $bit is set inside of $bits Both $bits and $bit are integers Returns false if the bit is not set

public static isBitSet( $bits,  $bit) : bool
Parameters
$bits :
$bit :
Return values
bool

unlimited()

Returns the max int which SQL can handle. This is useful for returning 'unlimited' results

public static unlimited(int $limit) : int
Parameters
$limit : int
Return values
int

Search results