public static function normalizeProperty($property)
    {
        //Remove an underscore, so you can do get_date()
        if(substr($property,0,1) == '_')
        {
            $property = substr($property, 1);
        }

        $property = lcfirst($property);

//        //Deal with famil-'ies', make it 'family'
//        if ('ies' == substr($property, -3)) {
//            $property = substr($property, 0, -3) . 'y';
//        }
//
//        //Deal with 'friends', make it 'friend'
//        if (preg_match('/[^s]s$/', $property))
//        {
//            $property = substr($property, 0, -1);
//        }

        return $property;
    }
public static function normalizeProperty($property)
    {
        //Remove an underscore, so you can do get_date()
        if(substr($property,0,1) == '_')
        {
            $property = substr($property, 1);
        }

        $property = lcfirst($property);

//        //Deal with famil-'ies', make it 'family'
//        if ('ies' == substr($property, -3)) {
//            $property = substr($property, 0, -3) . 'y';
//        }
//
//        //Deal with 'friends', make it 'friend'
//        if (preg_match('/[^s]s$/', $property))
//        {
//            $property = substr($property, 0, -1);
//        }

        return $property;
    }
public static function normalizeProperty ( $ property ) { //Remove an underscore, so you can do get_date() if ( substr ( $ property , 0 , 1 ) == '_' ) { $ property = substr ( $ property , 1 ) ; } $ property = lcfirst ( $ property ) ; //        //Deal with famil-'ies', make it 'family' //        if ('ies' == substr($property, -3)) { //            $property = substr($property, 0, -3) . 'y'; //        } // //        //Deal with 'friends', make it 'friend' //        if (preg_match('/[^s]s$/', $property)) //        { //            $property = substr($property, 0, -1); //        } return $ property ; }
Normalizes a property name, by making it lowercase and stripping off "ies" or "s"

@param string $property Property name to sigularize.
@return string Singularized property name.
Normalizes a property name by making it lowercase and stripping off ies or s