AloFramework documentation
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo

Namespaces

  • Alo
    • Cache
    • CLI
    • Controller
    • Db
      • Query
    • Exception
    • FileSystem
    • Session
    • Traversables
    • Validators
    • Windows
  • Controller
  • None
  • PHP

Classes

  • Cookie
  • Cron
  • Curl
  • Email
  • Format
  • Handler
  • Locale
  • Profiler
  • Security
  • SFTP

Class Format

Format validation statics

Abstract
Namespace:Alo
Package:Statics
Author:Art <a.molcanovas@gmail.com>
Located atsys/class/alo/format.php

Methods summary

public static boolean
#isJSON(mixed$data)

Checks whether the data is valid JSON

Checks whether the data is valid JSON

Parameters

$data
mixed
$data The data to check

Returns

boolean

Author

Art <a.molcanovas@gmail.com>
public static boolean
#isIpv4(string$input)

Checks if the supplied string is a valid IPv4 IP

Checks if the supplied string is a valid IPv4 IP

Parameters

$input
string
$input The input

Returns

boolean

Author

Art <a.molcanovas@gmail.com>
public static string
#scalarOutput(mixed$input,integer$prettifyMethod=Alo\Format::M_PRINT_R)

Makes output scalar. If $input is already scalar, simply returns it; otherwise uses a function specified in $prettifyMethod to make the output scalar

Makes output scalar. If $input is already scalar, simply returns it; otherwise uses a function specified in $prettifyMethod to make the output scalar

Parameters

$input
mixed
$input The input to scalarise
$prettifyMethod
integer
$prettifyMethod Function to use to make output scalar if $input isn't already scalar. See class M_* constants.

Returns

string
public static integer|float|mixed
#makeNumeric(mixed$var,boolean$boolMode=false)

Typecasts a variable to float or int if it's numeric

Typecasts a variable to float or int if it's numeric

Parameters

$var
mixed
$var The variable
$boolMode
boolean
$boolMode Whether we're checking for boolean mode FULLTEXT search values

Returns

integer|float|mixed

Author

Art <a.molcanovas@gmail.com>

Magic methods summary

Constants summary

integerM_SERIALIZE0
#

Defines an method as "serialize"

Defines an method as "serialize"

integerM_JSON1
#

Defines a method as "json_encode"

Defines a method as "json_encode"

integerM_PRINT_R2
#

Defines a method as "print_r"

Defines a method as "print_r"

AloFramework documentation API documentation generated byApiGen 2.8.0