eZPublishCommunityProject(LegacyStack)  2013.9
eZClusterEventListener Interface Reference

File containing the eZClusterEventListener class. More...

Public Member Functions

 deleteByDirList (array $dirList, $commonPath, $commonSuffix)
 Notifies of a deleteByDirList operation. More...
 
 deleteByLike ($like)
 Notifies of a deleteByLike operation. More...
 
 deleteByNametrunk ($nametrunk)
 Deletes all files matching the provided $nametrunk string. More...
 
 deleteByWildcard ($wildcard)
 Notifies of a deleteByWildcard operation. More...
 
 deleteFile ($filepath)
 Deletes $filepath. More...
 
 fileExists ($filepath)
 Checks if a file exists on the cluster. More...
 
 initialize ()
 Initializes the listener. More...
 
 loadMetadata ($filepath)
 Returns metadata array for $filepath, as supported by cluster. More...
 
 storeMetadata (array $metadata)
 Updates a file's metadata. More...
 

Detailed Description

File containing the eZClusterEventListener class.

Version
2013.9 Interface to be implemented by any cluster event listener

Member Function Documentation

eZClusterEventListener::deleteByDirList ( array  $dirList,
  $commonPath,
  $commonSuffix 
)

Notifies of a deleteByDirList operation.

Parameters
array$dirList
string$commonPath
string$commonSuffix
Returns
void
eZClusterEventListener::deleteByLike (   $like)

Notifies of a deleteByLike operation.

Parameters
string$like
Returns
void
eZClusterEventListener::deleteByNametrunk (   $nametrunk)

Deletes all files matching the provided $nametrunk string.

Parameters
string$nametrunk
Returns
void
eZClusterEventListener::deleteByWildcard (   $wildcard)

Notifies of a deleteByWildcard operation.

Parameters
string$wildcard
Returns
void
eZClusterEventListener::deleteFile (   $filepath)

Deletes $filepath.

Parameters
string$filepath
Returns
void
eZClusterEventListener::fileExists (   $filepath)

Checks if a file exists on the cluster.

If file does exist, this method must return an array (numeric indexes) containing following data:

  • name
  • mtime

return array( 'filename.txt', 1329921039 );

Returns false if file doesn't exist

Parameters
string$filepath
Returns
array|false
eZClusterEventListener::initialize ( )

Initializes the listener.

Here you may sets various options depending on your needs.

Returns
void
eZClusterEventListener::loadMetadata (   $filepath)

Returns metadata array for $filepath, as supported by cluster.

This array must have following keys :

  • name
  • name_trunk (name trunk for the entry, if none, equals to "name")
  • name_hash (md5 hash of "name")
  • scope
  • datatype
  • mtime (integer)
  • expired (integer, 0/1)

If no metadata is available, this method must return false

Parameters
string$filepath
Returns
array|false
eZClusterEventListener::storeMetadata ( array  $metadata)

Updates a file's metadata.

Parameters
array$metadataSame array as eZClusterEventListener::loadMetadata()
Returns
void

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