Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
Public Member Functions | Public Attributes | List of all members
DynamicContentSource Class Reference
Inheritance diagram for DynamicContentSource:
ContentSource

Public Member Functions

 init ()
 getRequestedAttributes ()
 getContent ($path)
 getStartPage ($folderPath, $locale)
 contentFile ($path)
- Public Member Functions inherited from ContentSource
 getRepositoryApi ()

Public Attributes

 $cacheFolder
- Public Attributes inherited from ContentSource
 $usePersonalisation
 $personalisationFields = array()

Additional Inherited Members

- Static Public Member Functions inherited from ContentSource
static fileAccessible ($filePath, $folder)

Detailed Description

Gentics Portal.Node PHP Author & Copyright (c) by Gentics Software GmbH sales.nosp@m.@gen.nosp@m.tics..nosp@m.com http://www.gentics.com Licenses can be found in the LICENSE.txt file in the root-folder of this installation You must not use this software without a valid license agreement.

Class for loading content from Dynamic Content Renderer

Definition at line 12 of file DynamicContentSource.php.

Member Function Documentation

DynamicContentSource::contentFile (   $path)

Get content file location

Parameters
string$pathcontent path
Returns
string

Reimplemented from ContentSource.

Definition at line 224 of file DynamicContentSource.php.

{
return $this->cacheFolder . $path;
}
DynamicContentSource::getContent (   $path)

Get content absolute path. Checking if we have newest version on content, if yes return, else download and store

Parameters
string$pathcontent path
Returns
|mixed object contained file path, false if error

Reimplemented from ContentSource.

Definition at line 60 of file DynamicContentSource.php.

{
if ($this->_haveNewestVersion($path)) {
return $this->_takeFromFileSystem($path);
} else {
return $this->_takeAndSaveFromApi($path);
}
}
DynamicContentSource::getRequestedAttributes ( )

Return array of attributes which will be requested from API

Returns
array array of attributes

Reimplemented from ContentSource.

Definition at line 34 of file DynamicContentSource.php.

{
$mainAttributes = array(
'contentid',
'name',
'filename',
'updatetimestamp',
'languagecode',
'mimetype',
'content'
);
if ($this->usePersonalisation) {
return array_merge($mainAttributes, $this->personalisationFields);
}
return $mainAttributes;
}
DynamicContentSource::init ( )

Init Gentics Connector API

Definition at line 24 of file DynamicContentSource.php.

{
}

The documentation for this class was generated from the following file: