# util/DataStore.php

## \DataStore
jump to top

Package: phing\util

An abstract representation of file and directory pathnames.

Author
  Michiel Rook
Version
  $Revision: 543 $

### Properties

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

Type
  n/a

`$file= 'null'`
Default value `null` Details

Type
  n/a

### Methods

`__construct( \PhingFile $file ) : void`

Constructs a new data store

Parameters

Name | Type | Description
--- | --- | ---
$file | \PhingFile | object pointing to the data store on disk

`__destruct( ) : void`

Destructor

`commit( ) : \none`

Commits data store to disk

Returns

Type | Description
--- | ---
\none |

`get( string $key ) : mixed`

Retrieves a value from the data store

Parameters

Name | Type | Description
--- | --- | ---
$key | string | the key

Returns

Type | Description
--- | ---
mixed | the value

`put( string $key, mixed $value, boolean $autocommit = false ) : \none`

Adds a value to the data store

Parameters

Name | Type | Description
--- | --- | ---
$key | string | the key
$value | mixed | the value
$autocommit | boolean | whether to auto-commit (write) the data store to disk

Returns

Type | Description
--- | ---
\none |

`read( ) : \none`

Internal function to read data store from file

Returns

Type | Description
--- | ---
\none |

`write( ) : \none`

Internal function to write data store to file

Returns

Type | Description
--- | ---
\none |

Documentation was generated by DocBlox 0.17.1.