for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* php-gedcom.
*
* php-gedcom is a library for parsing, manipulating, importing and exporting
* GEDCOM 5.5 files in PHP 5.3+.
* @author Xiang Ming <[email protected]>
* @copyright Copyright (c) 2010-2013, Xiang Ming
* @license MIT
* @link http://github.com/mrkrstphr/php-gedcom
*/
namespace PhpGedcom\Writer;
class Caln
{
* @param \PhpGedcom\Record\Caln $note
* @param int $level
* @return string
public static function convert(\PhpGedcom\Record\Caln &$caln, $level)
$output = '';
$_caln = $caln->getCaln();
if (empty($_caln)) {
return $output;
} else {
$output .= $level.' CALN '.$_caln."\n";
}
// level up
$level++;
// medi
$medi = $caln->getMedi();
if (!empty($medi)) {
$output .= $level.' MEDI '.$medi."\n";