Kajona\System\System\Remoteloader

Class providing a wrapper to remote objects. Provides methods to load text-files (e.g. xml-files) from a remote server. Tries to establish a connection via file_get_contents or via sockets.

Synopsis

class Remoteloader {
}

Members

private

  • $bitCacheEnabledKajona\System\System\bool
  • $intMaxCachetime — int
    The maximum time in seconds a request may be cached.
  • $intPort — int
    The port to open the connection, e.g. 80, especially to be used with sockets.
  • $objCachemanagerKajona\System\System\CacheManager
  • $strHost — string
    The host to query
  • $strProtocolHeader — string
    The protocol to use, e.g. http://
  • $strQueryParams — string
    Additional params to add after the port-definition

Methods

private

  • buildCacheChecksum() — Creates a md5 based cache-checksum to identify the query
  • connectByFileGetContents() — Tries to load a remote located content via the built in php-function and returns the string
  • connectFSockOpen() — Tries to load a remote located content via fsockopen and returns the string
  • connectViaCurl() — Tries to load a remote located content via curl extensions and returns the string
  • connectViaSocket() — Tries to load a remote located content via the socket-class and returns the string
  • loadByCache() — Tries to find a valid cache-entry for the current query
  • saveResponseToCache() — saves the response from the server to the internal cache

public