Overview

Namespaces

  • webfilesframework
    • codegeneration
      • general
      • php
    • core
      • datastore
        • functions
          • filter
          • sorting
        • types
          • database
            • resultHandler
          • directory
          • googlecalendar
          • mail
          • remote
      • datasystem
        • database
        • file
          • format
            • media
              • image
                • handler
          • system
            • dropbox
      • datatypes
        • time
      • time
    • io
      • form
        • formItem
        • validation
        • webfile
      • request

Classes

  • MAbstractCachableDatastore
  • MAbstractDatastore
  • MCombinedDatastore
  • MDatastoreFactory
  • MDatastoreTransfer

Interfaces

  • MISingleDatasourceDatastore

Exceptions

  • MDatastoreException
  • Overview
  • Namespace
  • Class

Class MAbstractDatastore

Base class for defining datastores to save and load webfiles on a standardized way.
More about the definition of a datastore can be found under the following link.

Implements the webfiles standard to be able to edit datastores with help of the webfile editor.

webfilesframework\core\datasystem\file\format\MWebfile
Extended by webfilesframework\core\datastore\MAbstractDatastore

Direct known subclasses

webfilesframework\core\datastore\MAbstractCachableDatastore, webfilesframework\core\datastore\MCombinedDatastore, webfilesframework\core\datastore\types\database\MDatabaseDatastore, webfilesframework\core\datastore\types\directory\MDirectoryDatastoreWebfile, webfilesframework\core\datastore\types\mail\MImapDatastore, webfilesframework\core\datastore\types\remote\MRemoteDatastore

Indirect known subclasses

webfilesframework\core\datastore\types\directory\MDirectoryDatastore, webfilesframework\core\datastore\types\googlecalendar\MGoogleCalendarDatastore
Abstract
Namespace: webfilesframework\core\datastore
Author: Sebastian Monzel < mail@sebastianmonzel.de >
Since: 0.1.7
Located at core/datastore/MAbstractDatastore.php
Methods summary
abstract public
# tryConnect( )

Checks if a connection is possible.

Checks if a connection is possible.

abstract public boolean
# isReadOnly( )

Determines if the datastore is read-only or not.

Determines if the datastore is read-only or not.

Returns

boolean
information if datastore is readonly or not.
public
# getNextWebfileForTimestamp( $timestamp )

Some datastore cannot be sorted by time due to performance issues. In this time cache can solve the problem. For letting the developer decide if implementing sorting by timestamp this function sets the sorting to true or false.

Some datastore cannot be sorted by time due to performance issues. In this time cache can solve the problem. For letting the developer decide if implementing sorting by timestamp this function sets the sorting to true or false.

Parameters

$timestamp

Throws

webfilesframework\core\datastore\MDatastoreException
abstract public webfilesframework\core\datasystem\file\format\MWebfileStream
# getWebfilesAsStream( )

Returns a webfiles stream with all webfiles from the actual datastore.

Returns a webfiles stream with all webfiles from the actual datastore.

Returns

webfilesframework\core\datasystem\file\format\MWebfileStream
abstract public array
# getWebfilesAsArray( )

Returns all webfiles from the actual datastore.

Returns all webfiles from the actual datastore.

Returns

array
list of webfiles
abstract public array
# getLatestWebfiles( integer $count = 5 )

Returns the latests webfiles. Sorting will happen according to the time information of the webfiles.

Returns the latests webfiles. Sorting will happen according to the time information of the webfiles.

Parameters

$count
Count of webfiles to be selected.

Returns

array
list of webfiles
abstract public array
# searchByTemplate( webfilesframework\core\datasystem\file\format\MWebfile $template )

Returns a set of webfiles in the actual datastore which matches with the given template.
Searching by template is devided in two steps:

  1. On the first step you define the template you want to search with. Here can help you the method presetDefaultForTemplate on the class MWebfile.
  2. On the second step you put the template to the datastore to start the search

Returns a set of webfiles in the actual datastore which matches with the given template.
Searching by template is devided in two steps:

  1. On the first step you define the template you want to search with. Here can help you the method presetDefaultForTemplate on the class MWebfile.
  2. On the second step you put the template to the datastore to start the search

Parameters

$template
template to search for

Returns

array
list of webfiles
protected array
# filterWebfilesArrayByTemplate( array $webfiles, webfilesframework\core\datasystem\file\format\MWebfile $template )

Parameters

$webfiles
$template

Returns

array

Throws

ReflectionException
public
# storeWebfile( webfilesframework\core\datasystem\file\format\MWebfile $webfile )

Stores a single webfile in the datastore.

Stores a single webfile in the datastore.

Parameters

$webfile

Throws

webfilesframework\core\datastore\MDatastoreException
public
# storeWebfilesFromStream( webfilesframework\core\datasystem\file\format\MWebfileStream $webfileStream )

Stores all webfiles from a given webfilestream in the actual datastore

Stores all webfiles from a given webfilestream in the actual datastore

Parameters

$webfileStream

Throws

webfilesframework\core\datastore\MDatastoreException
public
# deleteByTemplate( webfilesframework\core\datasystem\file\format\MWebfile $template )

Deletes a set of webfiles in the actual datastore which can be applied to the given template.

Deletes a set of webfiles in the actual datastore which can be applied to the given template.

Parameters

$template

Throws

webfilesframework\core\datastore\MDatastoreException
public static webfilesframework\core\datasystem\file\format\MWebfile
# resolveCustomDatastoreById( string $datastoreId )

Resolves a datastore which is localized in the folder "./custom/datastore" according to the given id.
Every file situated in the datastore folder will be converted to a webfile an the list of webfiles will be used to compare the id on each datastore in the folder.

Resolves a datastore which is localized in the folder "./custom/datastore" according to the given id.
Every file situated in the datastore folder will be converted to a webfile an the list of webfiles will be used to compare the id on each datastore in the folder.

Parameters

$datastoreId

Returns

webfilesframework\core\datasystem\file\format\MWebfile
returns the found datastore

Throws

webfilesframework\core\datastore\MDatastoreException

will be thrown if no datastore with*@throws \webfilesframework\MWebfilesFrameworkException the given id is available.


ReflectionException
webfilesframework\MWebfilesFrameworkException
public static array
# extractDatasetsFromWebfilesArray( $webfilesArray )

Parameters

$webfilesArray

Returns

array

Throws

ReflectionException
protected
# addWebfileSafetyToArray( webfilesframework\core\datasystem\file\format\MWebfile $webfile, $objectsArray )
Methods inherited from webfilesframework\core\datasystem\file\format\MWebfile
classname(), createWebfileByClassname(), getAttributes(), getClassInformation(), getDataset(), getDatatypeFromAttributeName(), getGeograficPosition(), getId(), getSimplifiedAttributeName(), getTime(), isObject(), isSimpleDatatype(), marshall(), matchesTemplate(), presetForTemplateSearch(), setId(), setTime(), staticUnmarshall(), unmarshall()
Properties inherited from webfilesframework\core\datasystem\file\format\MWebfile
$m_iId, $m_iTime
API documentation generated by ApiGen