58 lines
696 B
PHP
58 lines
696 B
PHP
|
<?php
|
||
|
|
||
|
namespace alveolata\structures;
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @template type_first
|
||
|
* @template type_second
|
||
|
*/
|
||
|
class struct_subject_pair
|
||
|
{
|
||
|
|
||
|
/**
|
||
|
* @var type_first
|
||
|
*/
|
||
|
public $first;
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @var type_second
|
||
|
*/
|
||
|
public $second;
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @param type_first $first
|
||
|
* @param type_second $second
|
||
|
*/
|
||
|
public function __construct($first, $second) {
|
||
|
$this->first = $first;
|
||
|
$this->second = $second;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @template type_first
|
||
|
* @template type_second
|
||
|
* @param type_first $first
|
||
|
* @param type_second $second
|
||
|
* @return struct_subject_pair<type_first,type_second>
|
||
|
*/
|
||
|
function pair_make(
|
||
|
$first,
|
||
|
$second
|
||
|
) {
|
||
|
return (
|
||
|
new struct_subject_pair(
|
||
|
$first,
|
||
|
$second
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
|
||
|
|
||
|
?>
|