# tasks/system/TstampTask.php

Sets properties to the current time, or offsets from the current time.

The default properties are TSTAMP, DSTAMP and TODAY;

Based on Ant's Tstamp task.

Author
  Michiel Rook
Package
  phing.tasks.system
Since
  2.2.0
Version
  $Revision: 557 $

## \TstampCustomFormat
jump to top

Package: phing\tasks\system

### Properties

`$locale= '""'`
Default value`""`Details

Type
  n/a

`$pattern= '""'`
Default value`""`Details

Type
  n/a

`$propertyName= '""'`
Default value`""`Details

Type
  n/a

### Methods

`execute( \TstampTask $tstamp ) : void`

validate parameter and execute the format.

Parameters

Name | Type | Description
--- | --- | ---
$tstamp | \TstampTask | reference to task

`setLocale( $locale ) : void`

The locale used to create date/time string.

Parameters

Name | Type | Description
--- | --- | ---
$locale |  | locale

`setPattern( $pattern ) : void`

The date/time pattern to be used. The values are as defined by the PHP strftime() function.

Parameters

Name | Type | Description
--- | --- | ---
$pattern |  | pattern

`setProperty( \propertyName $propertyName ) : void`

The property to receive the date/time string in the given pattern

Parameters

Name | Type | Description
--- | --- | ---
$propertyName | \propertyName | the name of the property.

## \TstampTask
jump to top

Package: phing\tasks\system

Sets properties to the current time, or offsets from the current time.

The default properties are TSTAMP, DSTAMP and TODAY;

Based on Ant's Tstamp task.

Parent(s)
  \Task < \ProjectComponent
Author
  Michiel Rook
Since
  2.2.0
Version
  $Revision: 557 $

### Properties

`$customFormats= 'array()'`
Default value `array()`Details

Type
  n/a

`$prefix= '""'`
Default value`""`Details

Type
  n/a

### Methods

`addFormat( \TstampCustomFormat $cf ) : void`

Adds a custom format

Parameters

Name | Type | Description
--- | --- | ---
$cf | \TstampCustomFormat | custom format

`getDescription( ) : void`

`getLocation( ) : void`

`getOwningTarget( ) : void`

`getProject( ) : void`

`getRegisterSlot( ) : void`

`getRuntimeConfigurableWrapper( ) : void`

`getTaskName( ) : void`

`getTaskType( ) : void`

`init( ) : void`

`log( ) : void`

`main( ) : void`

Create the timestamps. Custom ones are done before the standard ones.

Throws

Exception | Description
--- | ---
\BuildException |

`maybeConfigure( ) : void`

`perform( ) : void`

`prefixProperty( $name, $value ) : void`

helper that encapsulates prefix logic and property setting policy (i.e. we use setNewProperty instead of setProperty).

Parameters

Name | Type | Description
--- | --- | ---
$name |  |
$value |  |

`setDescription( ) : void`

`setLocation( ) : void`

`setOwningTarget( ) : void`

`setPrefix( \prefix $prefix ) : void`

Set a prefix for the properties. If the prefix does not end with a "." one is automatically added.

Parameters

Name | Type | Description
--- | --- | ---
$prefix | \prefix | the prefix to use.

`setProject( ) : void`

`setRuntimeConfigurableWrapper( ) : void`

`setTaskName( ) : void`

`setTaskType( ) : void`

Documentation was generated by DocBlox 0.17.1.