metaphrase/php-sdk
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo

Namespaces

  • metaphrase
    • phpsdk
      • cache
      • controllers

Classes

  • File
  • Memcached
  • Mysql
  • Simple

Class Mysql

File cache

Cache implementation using Mysql database.

metaphrase\phpsdk\cache\Mysql implements metaphrase\phpsdk\ICache
Namespace: metaphrase\phpsdk\cache
Package: metaphrase\phpsdk
Copyright: (c) 2014-2015, Spafaridis Xenophon
License: LGPL License 2.1
Author: Spafaridis Xenophon nohponex@gmail.com
Todo: Work in progress
Located at metaphrase/phpsdk/cache/Mysql.php

Methods summary

public
# __construct( array $connection, integer $TTL = 3600, $debug = FALSE )

Initialize cache engine

Initialize cache engine

Parameters

$connection
MySQL connection settings.
$TTL
[Optional] Life time of stored translated data.
$debug
public
# store( integer $id, string $language_code, array $data, array $type = metaphrase\phpsdk\cache\ICache::TYPE_PROJECT )

Store translated data in egnine

Store translated data in egnine

Parameters

$id
$language_code
$data
$type
[Optional] Storage data type. Default is project

Implementation of

metaphrase\phpsdk\ICache::store()
public array|null
# fetch( integer $id, string $language_code, array $type = metaphrase\phpsdk\cache\ICache::TYPE_PROJECT )

Get stored translated data from engine

Get stored translated data from engine

Parameters

$id
$language_code
$type
[Optional] Storage data type. Default is project

Returns

array|null
Translated data

Implementation of

metaphrase\phpsdk\ICache::fetch()

Magic methods summary

Constants summary

Constants inherited from metaphrase\phpsdk\ICache

TYPE_KEYWORD, TYPE_PROJECT

metaphrase/php-sdk API documentation generated by ApiGen