# classes/phing/util/DataStore.php

## \DataStore
jump to top

An abstract representation of file and directory pathnames.

author
  Michiel Rook
package
  phing.util
version
  $Revision: 543 $

### Properties

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

Type

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

Type

### Methods

`__construct( \PhingFile $file ) :`
Constructs a new data store
Parameters

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

`__destruct( ) :`
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 |

`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.13.1.