小编edd*_*ddy的帖子

实体与用例澄清

据我了解, use casesinteractors用于entities执行某些操作,而,entities持有我们的business rules.

根据这个定义:

用例与实体交互并依赖于实体

用例以什么方式依赖于实体,关系是什么?

例如,假设我们有一个具有三个功能的银行应用程序:loginview balancetransfer funds

因此,为了能够转移资金,用户必须登录并且应该有足够的余额。

我猜我们这里的用例是,transfer funds上面的语句是business rule,如果是这样的话,如何实现它?

类比很多,但正确的实现却很少。

use-case clean-architecture

11
推荐指数
1
解决办法
3475
查看次数

TCPDF 使用 writeHTML 遇到间距问题

我正在使用 html 创建 pdf。下面是我的代码:

$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);


$pdf->SetMargins(15, 20, 14, 0);
$pdf->SetAutoPageBreak(TRUE, 0);
$pdf->setCellPaddings(0,0,0,0);
$pdf->setFooterMargin(0);
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);

// add a page
$pdf->AddPage();

    $html = '
    <div style="background-color: #f8f8f8;">

    <div style="font-size: 24px; color: #333; font-weight: 600; font-family:Arial,Helvetica,sans-serif;">Example</div>

    <p style="color: #828282; font-size: 14px; font-family: sans-serif;">Lorem Ipsum is simply dummy text of the printing and typesetting industry. 
    Lorem Ipsum has been the industry standard dummy text ever since the 1500s, 
    when an unknown printer took a galley …
Run Code Online (Sandbox Code Playgroud)

php tcpdf

6
推荐指数
1
解决办法
3938
查看次数

标签 统计

clean-architecture ×1

php ×1

tcpdf ×1

use-case ×1