有界上下文是否涵盖所有应用程序层(域,应用程序,演示文稿和基础架构)或仅域模型?例如,我应该使用以下结构:
<bc 1>
|_ domain
|_ application
|_ presentation
|_ infrastructure
<bc 2>
|_ domain
|_ application
|_ presentation
|_ infrastructure
Run Code Online (Sandbox Code Playgroud)
或以下:
domain
|_ <bc 1>
|_ <bc 2>
application
presentation
infrastructure
Run Code Online (Sandbox Code Playgroud) PHP手册指出使用php://输入支持查找操作打开的流,从PHP 5.6开始可以多次读取,但我无法使其工作.以下示例清楚地显示它不起作用:
<!DOCTYPE html>
<html>
<body>
<form method="post">
<input type="hidden" name="test_name" value="test_value">
<input type="submit">
</form>
<?php
if ($_SERVER['REQUEST_METHOD'] === 'POST')
{
$input = fopen('php://input', 'r');
echo 'First attempt: ' . fread($input, 1024) . '<br>';
if (fseek($input, 0) != 0)
exit('Seek failed');
echo 'Second attempt: ' . fread($input, 1024) . '<br>';
}
?>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
输出:
First attempt: test_name=test_value
Second attempt:
Run Code Online (Sandbox Code Playgroud)
php://输入流是
难道我做错了什么?