PHP Class Newscoop\Storage

Datei anzeigen Open project: sourcefabric/newscoop Class Usage Examples

Protected Properties

Property Type Description
$root string

Public Methods

Method Description
__construct ( string $root )
copyItem ( string $src, string $dest ) : boolean Copy item
createDir ( string $key ) : void Create dir
createFile ( string $key ) : void Create file
deleteItem ( string $key ) : void Delete item
fetchItem ( string $key ) : mixed Fetch item
fetchMetadata ( string $key ) : array Fetch item metadata
getItem ( string $key ) : Newscoop\StorageItem Get storage item
getMimeType ( string $key ) : string Get mime type
getRealpath ( string $key ) : string Get realpath
isDir ( string $key ) : boolean Test if item is dir
isUsed ( string $key, object $searchEngine = null ) : mixed Test is used
isWritable ( string $key ) : boolean Test is writable
listItems ( string $key ) : mixed List items
listPaths ( $dir )
moveItem ( string $src, string $dest ) : void Move item
nrListItems ( $dir )
renameItem ( string $src, string $dest ) : void Rename item
storeItem ( string $dest, string $data ) : integer Store item

Private Methods

Method Description
getPath ( string $key, $isRealpath = FALSE ) : mixed Get path
replace ( string $old, string $new, object $replaceEngine = null ) : void Replace key in storage

Method Details

__construct() public method

public __construct ( string $root )
$root string

copyItem() public method

Copy item
public copyItem ( string $src, string $dest ) : boolean
$src string
$dest string
return boolean

createDir() public method

Create dir
public createDir ( string $key ) : void
$key string
return void

createFile() public method

Create file
public createFile ( string $key ) : void
$key string
return void

deleteItem() public method

Delete item
public deleteItem ( string $key ) : void
$key string
return void

fetchItem() public method

Fetch item
public fetchItem ( string $key ) : mixed
$key string
return mixed

fetchMetadata() public method

Fetch item metadata
public fetchMetadata ( string $key ) : array
$key string
return array

getItem() public method

Get storage item
public getItem ( string $key ) : Newscoop\StorageItem
$key string
return Newscoop\StorageItem

getMimeType() public method

Get mime type
public getMimeType ( string $key ) : string
$key string
return string

getRealpath() public method

Get realpath
public getRealpath ( string $key ) : string
$key string
return string

isDir() public method

Test if item is dir
public isDir ( string $key ) : boolean
$key string
return boolean

isUsed() public method

Test is used
public isUsed ( string $key, object $searchEngine = null ) : mixed
$key string
$searchEngine object
return mixed

isWritable() public method

Test is writable
public isWritable ( string $key ) : boolean
$key string
return boolean

listItems() public method

List items
public listItems ( string $key ) : mixed
$key string
return mixed

listPaths() public method

public listPaths ( $dir )

moveItem() public method

Move item
public moveItem ( string $src, string $dest ) : void
$src string
$dest string
return void

nrListItems() public method

public nrListItems ( $dir )

renameItem() public method

Rename item
public renameItem ( string $src, string $dest ) : void
$src string
$dest string
return void

storeItem() public method

Store item
public storeItem ( string $dest, string $data ) : integer
$dest string
$data string
return integer

Property Details

$root protected_oe property

protected string $root
return string