PHP Class Newscoop\Service\Template

Mostra file Open project: sourcefabric/newscoop Class Usage Examples

Protected Properties

Property Type Description
$repository Newscoop\Entity\Repository\TemplateRepository
$storage Newscoop\Storage
$syncResServ Newscoop\Service\Implementation\SyncResourceServiceDoctrine Used for getting the proper id of a template
$theme Newscoop\Entity\Theme The theme that the files belong to

Public Methods

Method Description
__construct ( Storage $storage, TemplateRepository $repository )
cacheTemplates ( $path )
copyItem ( string $src, string $dest ) : void Copy item
createFile ( string $name ) : void Create file
createFolder ( string $name ) : void Create folder
deleteItem ( string $key ) : void Delete item
fetchItem ( string $key ) : string Fetch item
fetchMetadata ( string $key ) : object Fetch item metadata
isWritable ( string $dest ) : boolean Test is writable
listItems ( string $path ) : Iterator Find items
listPaths ( string $path ) List paths in theme dir.
moveItem ( string $src, string $dest ) : void Move item
renameItem ( string $src, string $dest ) : void Rename item
replaceItem ( string $key, Zend_Form_Element_File $file ) : void Replace item
setTheme ( Theme $theme )
storeItem ( string $key, string $data ) : void Store item
storeMetadata ( string $key, array $metadata ) : void Store metadata

Method Details

__construct() public method

public __construct ( Storage $storage, TemplateRepository $repository )
$storage Newscoop\Storage
$repository Newscoop\Entity\Repository\TemplateRepository

cacheTemplates() public method

public cacheTemplates ( $path )

copyItem() public method

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

createFile() public method

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

createFolder() public method

Create folder
public createFolder ( string $name ) : void
$name 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 ) : string
$key string
return string

fetchMetadata() public method

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

isWritable() public method

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

listItems() public method

Find items
public listItems ( string $path ) : Iterator
$path string
return Iterator

listPaths() public method

.
public listPaths ( string $path )
$path string

moveItem() public method

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

renameItem() public method

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

replaceItem() public method

Replace item
public replaceItem ( string $key, Zend_Form_Element_File $file ) : void
$key string
$file Zend_Form_Element_File
return void

setTheme() public method

public setTheme ( Theme $theme )
$theme Newscoop\Entity\Theme

storeItem() public method

Store item
public storeItem ( string $key, string $data ) : void
$key string
$data string
return void

storeMetadata() public method

Store metadata
public storeMetadata ( string $key, array $metadata ) : void
$key string
$metadata array
return void

Property Details

$repository protected_oe property

protected TemplateRepository,Newscoop\Entity\Repository $repository
return Newscoop\Entity\Repository\TemplateRepository

$storage protected_oe property

protected Storage,Newscoop $storage
return Newscoop\Storage

$syncResServ protected_oe property

Used for getting the proper id of a template
protected Newscoop\Service\Implementation\SyncResourceServiceDoctrine $syncResServ
return Newscoop\Service\Implementation\SyncResourceServiceDoctrine

$theme protected_oe property

The theme that the files belong to
protected Theme,Newscoop\Entity $theme
return Newscoop\Entity\Theme