Skip to content

Instantly share code, notes, and snippets.

@mcfdn
mcfdn / App_Validate_Xml.php
Created October 9, 2012 12:05
Validate XML With Zend_Form
<?php
class App_Validate_Xml extends Zend_Validate_Abstract
{
const ERROR_MESSAGE = 'error';
public $xmlError;
protected $_messageVariables = array(
'xmlError' => 'xmlError'
);
@mcfdn
mcfdn / PluralHelper.php
Created October 7, 2012 14:30
Manage Singular and Plural Words
<?php
/**
* @author James McFadden <[email protected]>
*/
final class PluralHelper
{
private static $irregularPluralForms = array(
'alumnus' => 'alumni',
'analysis' => 'analyses',
'appendix' => 'appendices',