PHP code example of funfirst / vokativ

1. Go to this page and download the library: Download funfirst/vokativ library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

funfirst / vokativ example snippets



use Vokativ\Name;
$name = new Name();
$name->vokativ('Petr');		// 'petře'
$name->vokativ('Novák');	// 'nováku'
$name->vokativ('Adriana');	// 'adriano'
$name->vokativ('Fialová');	// 'fialová'


$name->vokativ('Michel');  			// 'micheli' - automaticky jako mužské
$name->vokativ('Michel', false);	// 'micheli'
$name->vokativ('Michel', true);		// 'michel'


$name->vokativ('Ivanova'); 				// 'ivanova' - automaticky příjmení
$name->vokativ('Ivanova', true, true);	// 'ivanova'
$name->vokativ('Ivanova', true, false);	// 'ivanovo'


$name->isMale('Michal'); 	// true
$name->isMale('Novák'); 	// true
$name->isMale('Tereza'); 	// false
$name->isMale('Nováková'); 	// false