public function noune($actor, $options = array())
    {
        $options = array_merge(array('useyou' => false), $options);
        $gender = strtolower($actor->gender);
        $type = $options['type'];

        if (!isset($actor) || is_null($actor)) {
            return '';
        }

        switch (strtolower($type)) {
            case 'pronoune'   :
                    if ($options['useyou']) {
                        $value = 'LIB-AN-YOU';
                    } else {
                        $value = $gender == 'male'
                                 ? 'LIB-AN-HE' : ($gender == 'female'
                                 ? 'LIB-AN-SHE'
                                 : 'LIB-AN-THEY');
                    }
                    break;

            case 'possessive' :

                    if ($options['useyou']) {
                        $value = 'LIB-AN-YOUR';
                        break;
                    }

                    $value = $gender == 'male'
                             ? 'LIB-AN-HIS' : ($gender == 'female'
                             ? 'LIB-AN-HER'
                             : 'LIB-AN-THEIR');
                    break;

            case 'objective' :
                    if ($options['useyou']) {
                        $value = 'LIB-AN-YOU';
                        break;
                    }

                    $value = $gender == 'male'
                             ? 'LIB-AN-HIM' : ($gender == 'female'
                             ? 'LIB-AN-HER'
                             : 'LIB-AN-THEM');
                    break;
        }

        return $value;
    }
public function noune($actor, $options = array())
    {
        $options = array_merge(array('useyou' => false), $options);
        $gender = strtolower($actor->gender);
        $type = $options['type'];

        if (!isset($actor) || is_null($actor)) {
            return '';
        }

        switch (strtolower($type)) {
            case 'pronoune'   :
                    if ($options['useyou']) {
                        $value = 'LIB-AN-YOU';
                    } else {
                        $value = $gender == 'male'
                                 ? 'LIB-AN-HE' : ($gender == 'female'
                                 ? 'LIB-AN-SHE'
                                 : 'LIB-AN-THEY');
                    }
                    break;

            case 'possessive' :

                    if ($options['useyou']) {
                        $value = 'LIB-AN-YOUR';
                        break;
                    }

                    $value = $gender == 'male'
                             ? 'LIB-AN-HIS' : ($gender == 'female'
                             ? 'LIB-AN-HER'
                             : 'LIB-AN-THEIR');
                    break;

            case 'objective' :
                    if ($options['useyou']) {
                        $value = 'LIB-AN-YOU';
                        break;
                    }

                    $value = $gender == 'male'
                             ? 'LIB-AN-HIM' : ($gender == 'female'
                             ? 'LIB-AN-HER'
                             : 'LIB-AN-THEM');
                    break;
        }

        return $value;
    }
public function noune ( $ actor , $ options = array ( ) ) { $ options = array_merge ( array ( 'useyou' => false ) , $ options ) ; $ gender = strtolower ( $ actor -> gender ) ; $ type = $ options [ 'type' ] ; if ( ! isset ( $ actor ) || is_null ( $ actor ) ) { return '' ; } switch ( strtolower ( $ type ) ) { case 'pronoune' : if ( $ options [ 'useyou' ] ) { $ value = 'LIB-AN-YOU' ; } else { $ value = $ gender == 'male' ? 'LIB-AN-HE' : ( $ gender == 'female' ? 'LIB-AN-SHE' : 'LIB-AN-THEY' ) ; } break ; case 'possessive' : if ( $ options [ 'useyou' ] ) { $ value = 'LIB-AN-YOUR' ; break ; } $ value = $ gender == 'male' ? 'LIB-AN-HIS' : ( $ gender == 'female' ? 'LIB-AN-HER' : 'LIB-AN-THEIR' ) ; break ; case 'objective' : if ( $ options [ 'useyou' ] ) { $ value = 'LIB-AN-YOU' ; break ; } $ value = $ gender == 'male' ? 'LIB-AN-HIM' : ( $ gender == 'female' ? 'LIB-AN-HER' : 'LIB-AN-THEM' ) ; break ; } return $ value ; }
Return pronoune, possessive noune or object noune for an actor. The type of
noune is passed as an option with key 'type'. If 'useyou' is passed it treat
the actor as second person.

@param ComActorsDomainEntityActor $actor
@param array                      $options Options to pass

@return string
Return pronoune possessive noune or object noune for an actor . The type of noune is passed as an option with key type . If useyou is passed it treat the actor as second person .