Silla.IO API
  • Namespace
  • Class
  • Tree
  • Todo
  • Download

Namespaces

  • App
    • Controllers
  • CMS
    • Controllers
    • Helpers
    • Models
  • Configurations
    • CI
    • Development
    • Production
    • Staging
  • Core
    • Base
    • CLI
      • Cache
      • DB
    • Helpers
    • Modules
      • Cache
        • Adapters
        • Interfaces
      • Crypt
      • DB
        • Adapters
        • Decorators
          • Interfaces
        • Features
          • Paginator
        • Interfaces
      • Registry
      • Render
        • Adapters
        • Interfaces
      • Router
      • Session
        • Adapters
        • Interfaces
  • None
  • Tasks
    • DB

Classes

  • Utils

Functions

  • Cache
  • Config
  • DB
  • DbCache
  • Registry
  • Router
  • Session

Class Utils

Utils class definition.

Final
Namespace: Core
Located at utils.php

Methods summary

public static string
# cleanInput( string $input )

Filters input.

Filters input.

Parameters

$input
Input string to be filtered.

Returns

string
public static mixed
# arraySearchRecursive( array $needle, array $haystack )

Searches array for a given element - recursive.

Searches array for a given element - recursive.

Parameters

$needle
Array of values to search.
$haystack
Array to be searched.

Returns

mixed
public static array
# arrayFlatten( array $array )

Flattens array to one dimension array.

Flattens array to one dimension array.

Parameters

$array
Array to flatten.

Returns

array
public static array
# arrayExtend( array $a, array $b )

Extends an array with an array.

Extends an array with an array.

Parameters

$a
Extended array.
$b
Extension array.

Returns

array
public static boolean
# httpRequestIsSsl( )

Determine if SSL is used to request resources.

Determine if SSL is used to request resources.

Returns

boolean
public static array
# parseHttpRequestString( string $request, string $separator )

Parses raw HTTP GET request array.

Parses raw HTTP GET request array.

Parameters

$request
Request string.
$separator
Separator of the URL elements.

Returns

array
public static boolean
# arrayIsAssoc( array $arr )

Checks whether an array is associative.

Checks whether an array is associative.

Parameters

$arr
Array to be checked.

Returns

boolean
public static string
# executeShellCommand( string $command )

Executes a shell command.

Executes a shell command.

Parameters

$command
Shell code to execute.

Returns

string
The result from the command execution.

See

putenv
public static string
# replaceFirstOccurrence( string $search, string $replace, string $subject )

Replaces first occurrence of the search string with the replacement string.

Replaces first occurrence of the search string with the replacement string.

Parameters

$search
The value being searched for, otherwise known as the needle.
$replace
The replacement value that replaces found search values.
$subject
The string or array being searched and replaced on, otherwise known as the haystack.

Returns

string
public static array
# formatArrayOfFiles( array & $files )

Convert the $_FILES array to the cleaner (IMHO) array.

Convert the $_FILES array to the cleaner (IMHO) array.

Parameters

$files
Array of files ($_FILES compatible array).

Returns

array
Reformatted array.
public static integer
# convertPHPSizeToBytes( mixed $sSize )

Convert PHP defined Size to Bytes.

Convert PHP defined Size to Bytes.

This function transforms the php.ini notation for numbers (like '2M') to an integer (210241024 in this case).

Parameters

$sSize
Size notation.

Returns

integer
public static array
# arrayToRefValues( array $array )

Convert array of values to array of refs.

Convert array of values to array of refs.

Parameters

$array
Array to be converted.

Returns

array
Refs.
public static string
# generatePassword( integer $length = 10 )

Generate random string suitable for password.

Generate random string suitable for password.

Parameters

$length
Number of chars.

Returns

string
public static boolean
# validatePassword( string $candidate )

Validates a sting against password policy.

Validates a sting against password policy.

Parameters

$candidate
Input.

Returns

boolean
Silla.IO API API documentation generated by ApiGen