     1: <?php
     2:     /**
     3:      * phpSyllable
     4:      * Splits up text into syllables and/or hyphenates text according to TeXbook language rules.
     5:      *
     6:      * Based on the work by Frank M. Liang (http://www.tug.org/docs/liang/)
     7:      * and the many volunteers in the TeX community.
     8:      *
     9:      * Patterns from the CTAN archive
    10:      * - http://www.ctan.org/tex-archive/language/hyph-utf8/tex/generic/hyph-utf8/patterns/tex/
    11:      * - http://www.ctan.org/tex-archive/language/hyphenation/
    12:      *
    13:      * @author Martijn W. van der Lee <martijn-at-vanderlee-dot-com>
    14:      * @author Wim Muskee <wimmuskee-at-gmail-dot-com>
    15:      * @copyright Copyright (c) 2011, Martijn W. van der Lee
    16:      * @license http://www.opensource.org/licenses/mit-license.php
    17:      */
    18:
    19:     function Syllable_autoloader($class) {
    20:         if (!class_exists($class) && is_file(dirname(__FILE__). '/' . $class . '.php')) {
    21:             require dirname(__FILE__). '/' . $class . '.php';
    22:         }
    23:     }
    24:
    25:     spl_autoload_register('Syllable_autoloader');
    26: