     1: <?php
     2:     /**
     3:      * phpSentence
     4:      * Splits up text into sentences.
     5:      *
     6:      * @author Martijn W. van der Lee <martijn-at-vanderlee-dot-com>
     7:      * @copyright Copyright (c) 2016, Martijn W. van der Lee
     8:      * @license http://www.opensource.org/licenses/mit-license.php
     9:      */
    10:
    11:     /**
    12:      * Classloader for the library
    13:      * @param string $class
    14:      */
    15:     function Sentence_autoloader($class) {
    16:         if (!class_exists($class) && is_file(dirname(__FILE__). '/' . $class . '.php')) {
    17:             require dirname(__FILE__). '/' . $class . '.php';
    18:         }
    19:     }
    20:
    21:     spl_autoload_register('Sentence_autoloader');
    22: