class Illuminate / Support / DateFactory

DateFactory

See

Constants

public

DEFAULT_CLASS_NAME string

The default class that will be used for all created dates.

Default: class

Properties

protected static

$dateClass string

The type (class) of dates that should be created.

Default: null
protected static

$callable callable

This callable may be used to intercept date creation.

Default: null
protected static

$factory object

The Carbon factory that should be used when creating dates.

Default: null

Methods

public static

use ( $handler ) : mixed

Use the given handler when generating dates (class name, callable, or factory).

Parameters

  • $handler mixed
public static

useDefault ( ) : void

Use the default date class when generating dates.

public static

useCallable ( callable $callable ) : void

Execute the given callable on each date creation.

Parameters

  • $callable callable
public static

useClass ( $dateClass ) : void

Use the given date type (class) when generating dates.

Parameters

  • $dateClass string
public static

useFactory ( $factory ) : void

Use the given Carbon factory when generating dates.

Parameters

  • $factory object
public

__call ( $method , $parameters ) : mixed

Handle dynamic calls to generate dates.

Parameters

  • $method string
  • $parameters array