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

Public Member Functions

 getContent ($path)
 getStartPage ($folderPath, $locale)
 contentFile ($path)
 getRequestedAttributes ()
 getRepositoryApi ()

Static Public Member Functions

static fileAccessible ($filePath, $folder)

Public Attributes

 $usePersonalisation
 $personalisationFields = array()

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.

Abstract class for access to content repository

Definition at line 12 of file ContentSource.php.

Member Function Documentation

ContentSource::contentFile (   $path)
abstract

Get content file location

Parameters
string$pathlocal path
Returns
string

Reimplemented in DynamicContentSource, and FileSystemContentSource.

static ContentSource::fileAccessible (   $filePath,
  $folder 
)
static

Check if file placed in $contentFolder folder. Prevent '../' attack.

Parameters
string$filePathrelative file path
string$folderin which file should placed
Returns
bool

Definition at line 67 of file ContentSource.php.

Referenced by FileSystemContentSource\getContent().

{
if ($realPath = realpath($filePath)) {
return strpos($realPath, realpath($folder)) === 0;
}
return false;
}
ContentSource::getContent (   $path)
abstract

Method which receive content path and return content

Parameters
string$pathcontent path
Returns
mixed

Reimplemented in DynamicContentSource, and FileSystemContentSource.

ContentSource::getRepositoryApi ( )

Get repository api class

Returns
RepositoryApi

Definition at line 81 of file ContentSource.php.

{
return Yii::app()->repositoryApi;
}
ContentSource::getRequestedAttributes ( )
abstract

Return array of attributes which will be requested from API

Returns
array array of attributes

Reimplemented in DynamicContentSource, and FileSystemContentSource.


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