library/Garp/Util/FullName.php
protected function _getFullName($person) {
        if (array_key_exists('first_name', $person)
            && array_key_exists('last_name_prefix', $person)
            && array_key_exists('last_name', $person)
        ) {
            $first = $person['first_name'];
            $middle = $person['last_name_prefix'] ? ' ' . $person['last_name_prefix'] : '';
            $last = $person['last_name'] ? ' ' . $person['last_name'] : '';
            return $first . $middle . $last;
        } elseif (array_key_exists('name', $person)) {
            return $person['name'];
        } else {
            throw new Exception(
                'This model does not have a first name, last name prefix ' .
                'and last name. Nor does it have a singular name field.'
            );
        }
    }
protected function _getFullName($person) {
        if (array_key_exists('first_name', $person)
            && array_key_exists('last_name_prefix', $person)
            && array_key_exists('last_name', $person)
        ) {
            $first = $person['first_name'];
            $middle = $person['last_name_prefix'] ? ' ' . $person['last_name_prefix'] : '';
            $last = $person['last_name'] ? ' ' . $person['last_name'] : '';
            return $first . $middle . $last;
        } elseif (array_key_exists('name', $person)) {
            return $person['name'];
        } else {
            throw new Exception(
                'This model does not have a first name, last name prefix ' .
                'and last name. Nor does it have a singular name field.'
            );
        }
    }
protected function _getFullName ( $ person ) { if ( array_key_exists ( 'first_name' , $ person ) && array_key_exists ( 'last_name_prefix' , $ person ) && array_key_exists ( 'last_name' , $ person ) ) { $ first = $ person [ 'first_name' ] ; $ middle = $ person [ 'last_name_prefix' ] ? ' ' . $ person [ 'last_name_prefix' ] : '' ; $ last = $ person [ 'last_name' ] ? ' ' . $ person [ 'last_name' ] : '' ; return $ first . $ middle . $ last ; } elseif ( array_key_exists ( 'name' , $ person ) ) { return $ person [ 'name' ] ; } else { throw new Exception ( 'This model does not have a first name, last name prefix ' . 'and last name. Nor does it have a singular name field.' ) ; } }
Create full name

@param Garp_Db_Table_Row|StdClass|array $person
@return string
Create full name