| <?php |
| /** |
| * File containing the ezcDocumentPdfHyphenator class |
| * |
| * Licensed to the Apache Software Foundation (ASF) under one |
| * or more contributor license agreements. See the NOTICE file |
| * distributed with this work for additional information |
| * regarding copyright ownership. The ASF licenses this file |
| * to you under the Apache License, Version 2.0 (the |
| * "License"); you may not use this file except in compliance |
| * with the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, |
| * software distributed under the License is distributed on an |
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| * KIND, either express or implied. See the License for the |
| * specific language governing permissions and limitations |
| * under the License. |
| * |
| * @package Document |
| * @version //autogen// |
| * @copyright Copyright (C) 2005-2010 eZ Systems AS. All rights reserved. |
| * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0 |
| * @access private |
| */ |
| |
| /** |
| * Abstract base class for hyphenation implementations. |
| * |
| * Hyphenation implementations are responsbile for language dependant splitting |
| * of words into hyphens, for better text wrapping especially in justified |
| * paragraphs. |
| * |
| * A proper hyphenation implementation should most probably be based on |
| * dicstionary files, provided by external tools. |
| * |
| * @package Document |
| * @access private |
| * @version //autogen// |
| */ |
| abstract class ezcDocumentPdfHyphenator |
| { |
| /** |
| * Split word into hypens |
| * |
| * Takes a word as a string and should return an array containing arrays of |
| * two words, which each represent a possible split of a word. The german |
| * word "Zuckerstück" for example changes its hyphens depending on the |
| * splitting point, so the return value would look like: |
| * |
| * <code> |
| * array( |
| * array( 'Zuk-', 'kerstück' ), |
| * array( 'Zucker-', 'stück' ), |
| * ) |
| * </code> |
| * |
| * You should always also include the concatenation character in the split |
| * words, since it might change depending on the used language. |
| * |
| * @param mixed $word |
| * @return void |
| */ |
| abstract public function splitWord( $word ); |
| } |
| ?> |