[ PHPXref.com ] [ Generated: Sun Jul 20 16:23:51 2008 ] [ Achievo 1.2.0 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/atk/meta/grammar/ -> class.atkdutchmetagrammar.inc (source)

   1  <?php
   2  /**
   3   * This file is part of the Achievo ATK distribution.
   4   * Detailed copyright and licensing information can be found
   5   * in the doc/COPYRIGHT and doc/LICENSE files which should be
   6   * included in the distribution.
   7   *
   8   * @package atk
   9   * @subpackage meta
  10   *
  11   * @copyright (c) 2004-2005 Peter C. Verhage
  12   * @license http://www.achievo.org/atk/licensing ATK Open Source License
  13   *
  14   * @version $Revision: 1.4 $
  15   * $Id: class.atkdutchmetagrammar.inc,v 1.4 2006/01/30 11:03:32 boy Exp $
  16   */
  17   
  18  /**
  19   * The basic (dutch) "grammar" rules.
  20   *
  21   * @author Peter C. Verhage <peter@achievo.org>
  22   *
  23   * @package atk
  24   * @subpackage meta
  25   */
  26  class atkDutchMetaGrammar extends atkMetaGrammar 
  27  {
  28    /**
  29     * Returns the list of singular rules.
  30     *
  31     * @return list of singular rules
  32     */
  33    function getSingularRules()
  34    {
  35      return array(
  36        '/ven$/i' => 'f',    
  37        '/ia$/i' => 'ium',
  38        '/onen$/i' => 'oon',
  39        '/([aoeiu])s$/i' => '\1',
  40        '/([^aoeiu])en$/i' => '\1'
  41      );
  42    }
  43    
  44    /**
  45     * Returns the list of plural rules.
  46     *
  47     * @return list of plural rules
  48     */
  49    function getPluralRules()
  50    {
  51      return array(
  52        '/f$/i' => 'ven',
  53        '/ium$/i' => 'ia',
  54        '/oon$/i' => 'onen',
  55        '/([aoeiu])$/i' => '\1s',
  56        '/([^aoeiu])$/i' => '\1en'
  57      );
  58    }  
  59  }


[ Powered by PHPXref - Served by Debian GNU/Linux ]