784b48ae8f4e31ce3ab9a147ccb003975cfbb751
Christian Fraß added transition-data and t...

Christian Fraß authored 8 years ago

source/content/principles.html.php     1) <?php
source/content/principles.html.php     2) global $configuration;
source/content/principles.html.php     3) include_once("source/logic/server/data.php");
source/content/principles.html.php     4) include_once("source/logic/server/sql.php");
source/content/principles.html.php     5) include_once("source/logic/server/table.php");
source/content/principles.html.php     6)  ?>
bfadmin-master advanced

bfadmin-master authored 8 years ago

source/structure/principles.html.php   7) <section class="section" id="principles">
bfadmin-master advanced

bfadmin-master authored 8 years ago

source/structure/principles.html.php   8) 	<header>Principles</header>
Christian Fraß save

Christian Fraß authored 6 years ago

source/content/principles.html.php     9) 	<p>The word stock of Folksprak is &dash; with minor exceptions &dash; derived from the modern Germanic languages (e.g. English, German, Swedish, &#8230;) and/or their precursors (e.g. Old English, Old Norse, Proto Germanic, etc.). Branches which no longer emerge today (e.g. the East Germanic languages like Gothic), were not incorporated.</p>
Christian Fraß update

Christian Fraß authored 7 years ago

source/content/principles.html.php    10) 	<p>The following table gives an overview about the typical transitions of phones from Proto-Germanic to some of todays natural Germanic languages and Folksprak, along with example words in square brackets:</p>
Christian Fraß added transition-data and t...

Christian Fraß authored 8 years ago

source/content/principles.html.php    11) 	<span class="todo">more entries</span>
source/content/principles.html.php    12) <?php
Christian Fraß update

Christian Fraß authored 7 years ago

source/content/principles.html.php    13) 	$data_common = read_json("source/data/common.json");
Christian Fraß added transition-data and t...

Christian Fraß authored 8 years ago

source/content/principles.html.php    14) 	$data_transitions = read_json("source/data/transitions.json");
source/content/principles.html.php    15) 	
source/content/principles.html.php    16) 	$data = $data_transitions["data"];
Christian Fraß update

Christian Fraß authored 7 years ago

source/content/principles.html.php    17) 	{
source/content/principles.html.php    18) 		{
source/content/principles.html.php    19) 			$data = sql_select($data, function ($row) {return in_array($row["language_id"], ["gem","flk","eng","deu","nld","dan","nob","swe","isl"]);});
source/content/principles.html.php    20) 		}
source/content/principles.html.php    21) 		{
source/content/principles.html.php    22) 			{
source/content/principles.html.php    23) 				$data = sql_cross($data, $data_common["languages"]);
source/content/principles.html.php    24) 				$data = sql_select($data, function ($row) {return ($row["language_id"] == $row["id"]);});
source/content/principles.html.php    25) 				$data = sql_delete($data, ["id"]);
source/content/principles.html.php    26) 				$data = sql_rename($data, "name", "language_name");
source/content/principles.html.php    27) 			}
source/content/principles.html.php    28) 		}
source/content/principles.html.php    29) 	}
source/content/principles.html.php    30) 		
Christian Fraß added transition-data and t...

Christian Fraß authored 8 years ago

source/content/principles.html.php    31) 	$table = new class_table
source/content/principles.html.php    32) 	(
source/content/principles.html.php    33) 		[
source/content/principles.html.php    34) 			new class_column("Transition", "transition_id"),
Christian Fraß update

Christian Fraß authored 7 years ago

source/content/principles.html.php    35) 			new class_column("Language", "language_name"),
source/content/principles.html.php    36) 			new class_column("Language ID", "language_id"),
source/content/principles.html.php    37) 			new class_column("Phones", "phones"),
Christian Fraß added transition-data and t...

Christian Fraß authored 8 years ago

source/content/principles.html.php    38) 			new class_column("Examples", "examples"),
source/content/principles.html.php    39) 		],
source/content/principles.html.php    40) 		$data
source/content/principles.html.php    41) 	);
source/content/principles.html.php    42) 	
source/content/principles.html.php    43) 	$table->snap
source/content/principles.html.php    44) 	(
source/content/principles.html.php    45) 		[
source/content/principles.html.php    46) 			"label_vertical" => function ($column) {return "";},
source/content/principles.html.php    47) 			"columns_vertical" =>
source/content/principles.html.php    48) 			[
source/content/principles.html.php    49) 				$table->columns_get()[0],
source/content/principles.html.php    50) 			],
source/content/principles.html.php    51) 			"label_horizontal" => function ($column, $value) {return $value;},
source/content/principles.html.php    52) 			"columns_horizontal" =>
source/content/principles.html.php    53) 			[
source/content/principles.html.php    54) 				$table->columns_get()[1],
source/content/principles.html.php    55) 			],
source/content/principles.html.php    56) 			"columns_data" =>
source/content/principles.html.php    57) 			[
source/content/principles.html.php    58) 				$table->columns_get()[2],
source/content/principles.html.php    59) 				$table->columns_get()[3],
Christian Fraß update

Christian Fraß authored 7 years ago

source/content/principles.html.php    60) 				$table->columns_get()[4],
Christian Fraß added transition-data and t...

Christian Fraß authored 8 years ago

source/content/principles.html.php    61) 			],
source/content/principles.html.php    62) 			"data_aggregator" => function ($values)
source/content/principles.html.php    63) 			{
source/content/principles.html.php    64) 				return $values;
source/content/principles.html.php    65) 			},
source/content/principles.html.php    66) 			"data_formatter" => function ($values)
source/content/principles.html.php    67) 			{
source/content/principles.html.php    68) 				if (count($values) == 1)
source/content/principles.html.php    69) 				{
Christian Fraß update

Christian Fraß authored 7 years ago

source/content/principles.html.php    70) 					$phones = implode(
Christian Fraß added transition-data and t...

Christian Fraß authored 8 years ago

source/content/principles.html.php    71) 						", ",
source/content/principles.html.php    72) 						array_map
source/content/principles.html.php    73) 						(
source/content/principles.html.php    74) 							function ($phoneme) use (&$values)
source/content/principles.html.php    75) 							{
source/content/principles.html.php    76) 								return mark($phoneme, ["type_word", "lang_" . $values[0]["language_id"]]);
source/content/principles.html.php    77) 							},
Christian Fraß update

Christian Fraß authored 7 years ago

source/content/principles.html.php    78) 							$values[0]["phones"]
Christian Fraß added transition-data and t...

Christian Fraß authored 8 years ago

source/content/principles.html.php    79) 						)
source/content/principles.html.php    80) 					);
source/content/principles.html.php    81) 					$examples = implode
source/content/principles.html.php    82) 					(
source/content/principles.html.php    83) 						", ",
source/content/principles.html.php    84) 						array_map
source/content/principles.html.php    85) 						(
source/content/principles.html.php    86) 							function ($word) use (&$values)
source/content/principles.html.php    87) 							{
source/content/principles.html.php    88) 								return mark($word, ["type_word", "lang_" . $values[0]["language_id"]]);
source/content/principles.html.php    89) 							},
source/content/principles.html.php    90) 							array_slice($values[0]["examples"], 0, 1)
source/content/principles.html.php    91) 						)
source/content/principles.html.php    92) 					);
Christian Fraß update

Christian Fraß authored 7 years ago

source/content/principles.html.php    93) 					$output = $phones;
Christian Fraß added transition-data and t...

Christian Fraß authored 8 years ago

source/content/principles.html.php    94) 					if (count($values[0]["examples"]) > 0)
source/content/principles.html.php    95) 					{
source/content/principles.html.php    96) 						$break = true;
source/content/principles.html.php    97) 						$breaker = $break ? "<br/>" : " ";
source/content/principles.html.php    98) 						$output .= "${breaker}[${examples}]";
source/content/principles.html.php    99) 					}
source/content/principles.html.php   100) 					return $output;
source/content/principles.html.php   101) 				}
source/content/principles.html.php   102) 				else
source/content/principles.html.php   103) 				{
source/content/principles.html.php   104) 					return "?";
source/content/principles.html.php   105) 				}
source/content/principles.html.php   106) 			},
source/content/principles.html.php   107) 		]
source/content/principles.html.php   108) 	)->generate();
source/content/principles.html.php   109)  ?>