Sgss_Font_Cache_Record
Represents a font cache record

Description

Used by:
Sgss_Font_Cache::getRecord(),Sgss_Font_Cache::createRecord()
Author:
Matsuda Shota
Copyright:
(c) 2007-2008 Matsuda Shota
Usedby:
Sgss_Font_Cache::getRecord()
License:
http://creativecommons.org/licenses/GPL/2.0/
Usedby:
Sgss_Font_Cache::createRecord()
Located in:
/Font/Cache/Record.php (line 56)

Class overview

Variables

protected Sgss_Font_Cache $_cache

Cache containing this record

protected PDO $_db

Database handle used with this record

protected Sgss_Collection_Pdo_Map $_fields

Field symbol map of this record

protected string $_name

Name of this record

protected Sgss_Collection_Pdo_Map $_variables

Variable map of this record

Methods

__construct (Sgss_Font_Cache $cache, string $name)

The constructor

void build ()

Builds this record in the cache file

void destroy ()

Destroys this record from the cache file

float getVersion ()

Returns the version of this record

void init ()

Initializes this record

void setVersion (float $version)

Sets the version of this record to the specified value

protected Sgss_Collection_Pdo_Map|Sgss_Collection_Pdo_Table _createField (mixed $name, [string $type = self::FIELD_MAP], [array $option = array()])

Creates the field specified by the parameters into this record

protected mixed|null _getField (mixed $name)

Returns the field associated with the specified name

protected boolean _hasField (mixed $name)

Determines whether this record contains the associated field with the specified name

protected boolean _removeField (mixed $name)

Removes the specified field name and associated field from this record

mixed __call (string $name, array $arguments)
mixed __get (mixed $name)
boolean __isset (mixed $name)
mixed __set (mixed $name, mixed $value)
void __unset (mixed $name)

Constants

FIELD_MAP = 'map' Field type identifier
FIELD_TABLE = 'table' Field type identifier

Variable detail

$_cache 

Cache containing this record

Signature:
protected Sgss_Font_Cache $_cache


$_db 

Database handle used with this record

Signature:
protected PDO $_db


$_fields 

Field symbol map of this record

Signature:
protected Sgss_Collection_Pdo_Map $_fields


$_name 

Name of this record

Signature:
protected string $_name


$_variables 

Variable map of this record

Signature:
protected Sgss_Collection_Pdo_Map $_variables


Method detail

__construct

The constructor

Parameters:
  • Sgss_Font_Cache $cache

    Cache containing this record

  • string $name

    Name of this record

Uses:
_init();
Signature:
public __construct (Sgss_Font_Cache $cache, string $name)


build

Builds this record in the cache file

Throws:
  • Sgss_Font_Cache_Exception

    When unable to build cache record

Signature:
public void build ()


destroy

Destroys this record from the cache file

Throws:
  • Sgss_Font_Cache_Exception

    When unable to destroy cache record

Used by:
Sgss_Font_Cache::removeRecord()
Signature:
public void destroy ()


getVersion

Returns the version of this record

Returns:
float -- Version of this record
Signature:
public float getVersion ()


init

Initializes this record

Uses:
Sgss_Collection_Pdo_Map
Signature:
public void init ()


setVersion

Sets the version of this record to the specified value

Parameters:
  • float $version

    Version of this record to set

Throws:
  • Sgss_Font_Cache_Exception

    When unable to set version of this record

Signature:
public void setVersion (float $version)


_createField 

Creates the field specified by the parameters into this record

Parameters:
  • mixed $name

    Name of the field to be created

  • string $type

    Type identifier of the field to be created

  • array $option

    Type-specific option array

Returns:
Sgss_Collection_Pdo_Map|Sgss_Collection_Pdo_Table -- Created field
Throws:
  • Sgss_Font_Cache_Exception

    When unable to create field

Signature:
protected Sgss_Collection_Pdo_Map|Sgss_Collection_Pdo_Table _createField (mixed $name, [string $type = self::FIELD_MAP], [array $option = array()])


_getField 

Returns the field associated with the specified name

Parameters:
  • mixed $name

    Name associated with the field to be retrieved

Returns:
mixed|null -- Retrieved field or null if this record does not contain the name
Throws:
  • Sgss_Font_Cache_Exception

    When undefined field type detected

Signature:
protected mixed|null _getField (mixed $name)


_hasField 

Determines whether this record contains the associated field with the specified name

Parameters:
  • mixed $name

    Record name to determine

Returns:
boolean -- True when this map contains the associated field
Signature:
protected boolean _hasField (mixed $name)


_removeField 

Removes the specified field name and associated field from this record

Parameters:
  • mixed $name

    Name associated with the field to be removed

Returns:
boolean -- True when the operation changed this list
Signature:
protected boolean _removeField (mixed $name)


__call

Parameters:
  • string $name
  • array $arguments
Signature:
public mixed __call (string $name, array $arguments)


__get

Parameters:
  • mixed $name
Signature:
public mixed __get (mixed $name)


__isset

Parameters:
  • mixed $name
Signature:
public boolean __isset (mixed $name)


__set

Parameters:
  • mixed $name
  • mixed $value
Signature:
public mixed __set (mixed $name, mixed $value)


__unset

Parameters:
  • mixed $name
Signature:
public void __unset (mixed $name)


Constant detail

FIELD_MAP

Field type identifier

Signature:
const FIELD_MAP = 'map'


FIELD_TABLE

Field type identifier

Signature:
const FIELD_TABLE = 'table'