Packages

  • Nette
    • Application
    • Caching
    • Collections
    • Config
    • Forms
    • IO
    • Loaders
    • Mail
    • Reflection
    • Security
    • Templates
    • Web
  • None
  • PHP

Classes

  • NArrayTools
  • NCallback
  • NComponent
  • NComponentContainer
  • NConfigurator
  • NDateTime53
  • NDebug
  • NEnvironment
  • NFramework
  • NFreezableObject
  • NGenericRecursiveIterator
  • NImage
  • NImageMagick
  • NInstanceFilterIterator
  • NObject
  • NObjectMixin
  • NPaginator
  • NRecursiveComponentIterator
  • NServiceLocator
  • NSmartCachingIterator
  • NString
  • NTools

Interfaces

  • IComponent
  • IComponentContainer
  • IDebuggable
  • IServiceLocator
  • ITranslator

Exceptions

  • NAmbiguousServiceException
  • Overview
  • Package
  • Class
  • Tree
  • Other releases

Class NTools

Tools library.

Final
Package: Nette
Author: David Grudl
Located at Utils/Tools.php
Methods summary
final public
# __construct( )

Static class - cannot be instantiated.

Static class - cannot be instantiated.

public static NDateTime53
# createDateTime( string|integer|DateTime $time )

DateTime object factory.

DateTime object factory.

Parameters

$time
string|integer|DateTime

Returns

NDateTime53
public static boolean
# iniFlag( string $var )

Gets the boolean value of a configuration option.

Gets the boolean value of a configuration option.

Parameters

$var
string
configuration option name

Returns

boolean
public static
# defaultize( mixed & $var, mixed $default )

Initializes variable with $default value.

Initializes variable with $default value.

Parameters

$var
mixed
variable
$default
mixed
default value
public static array
# glob( string $pattern, integer $flags = 0 )

Recursive glob(). Finds pathnames matching a pattern.

Recursive glob(). Finds pathnames matching a pattern.

Parameters

$pattern
string
$flags
integer

Returns

array
public static string
# detectMimeType( string $file )

Returns the MIME content type of file.

Returns the MIME content type of file.

Parameters

$file
string

Returns

string
public static
# tryError( $level = E_ALL )

Starts catching potential errors/warnings.

Starts catching potential errors/warnings.

public static boolean
# catchError( string & $message )

Returns catched error/warning message.

Returns catched error/warning message.

Parameters

$message
string
catched message

Returns

boolean
Constants summary
integer MINUTE 60
#

minute in seconds

minute in seconds

integer HOUR 3600
#

hour in seconds

hour in seconds

integer DAY 86400
#

day in seconds

day in seconds

integer WEEK 604800
#

week in seconds

week in seconds

integer MONTH 2629800
#

average month in seconds

average month in seconds

integer YEAR 31557600
#

average year in seconds

average year in seconds

Nette Framework 0.9.7 (for PHP 5.2) API documentation generated by ApiGen 2.3.0