Text_TeXHyphen
[ class tree: Text_TeXHyphen ] [ index: Text_TeXHyphen ] [ all elements ]

Class: Text_TeXHyphen_WordCache

Source Location: /Text_TeXHyphen-0.1.0/Text/TeXHyphen/WordCache.php

Class Overview


The abstract of the word cache class for the TeX hyphenation algorithm.


Author(s):

Version:

  • $Id$

Methods


Child classes:

Text_TeXHyphen_WordCache_SimpleHash
A simple hash class as word cache for the TeX hyphenation algorithm.

Inherited Variables

Inherited Methods


Class Details

[line 42]
The abstract of the word cache class for the TeX hyphenation algorithm.


[ Top ]


Method Detail

Text_TeXHyphen_WordCache (Constructor)   [line 62]

Text_TeXHyphen_WordCache Text_TeXHyphen_WordCache( )

Constructor of a Text_TeXHyphen_WordCache object.

At contruction of a Text_TeXHyphen_WordCache object the error stack will referenced to the 'Text_TeXHyphen' error stack.

  • Access: public

[ Top ]

add   [line 128]

boolean add( string $word, array $syls)

Adds a word and its syllables to the cache.
  • Return: true, if the $word could added to the cache otherwise false.

Overridden in child classes as:

Text_TeXHyphen_WordCache_SimpleHash::add()
Adds a word and its syllables to the cache.

Parameters:

string   $word   —  Word, which syllables should stored.
array   $syls   —  Array of strings, which contains of the syllables of the $word.

[ Top ]

factory   [line 79]

Text_TeXHyphen_WordCache|false &factory( string $type, [array $options = array()])

Factory for creating a word.
  • Return: Reference to an object of type Text_TeXHyphen_WordCache or a subclass of it, if successful or false on error.
  • Access: public

Overridden in child classes as:

Text_TeXHyphen_WordCache_SimpleHash::factory()
Factory for creating a word.

Parameters:

string   $type   —  Name of the word cache implementation.
array   $options   —  Options for word cache implementation.

[ Top ]

getSyllables   [line 113]

array|false getSyllables( string $word)

Gets the syllables of a word, if found in cache.
  • Return: Array of string or false, if $word isn't found.
  • Access: public

Overridden in child classes as:

Text_TeXHyphen_WordCache_SimpleHash::getSyllables()
Gets the syllables of a word, if found in cache.

Parameters:

string   $word   —  Word of which the syllables should got.

[ Top ]


Documentation generated on Mon, 11 Mar 2019 13:51:35 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.