草庐IT

billingItems

全部标签

PHP 静态与实例

我正准备编写一个方法将一些账单数据转换成发票。假设我有一个对象数组,其中包含创建调用项所需的数据。Whileinthebillingcontroller以下哪种方式是正确的$invoice=newInvoice();$invoice->createInvoiceFromBilling($billingItems);然后在发票类PublicFunctioncreateInvoiceFromBilling($billingItems){$this->data=$billingItems;或Invoice::createInvoiceFromBilling($billingItems)然后在