本文整理汇总了PHP中Stringy\Stringy::__toString方法的典型用法代码示例。如果您正苦于以下问题:PHP Stringy::__toString方法的具体用法?PHP Stringy::__toString怎么用?PHP Stringy::__toString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Stringy\Stringy
的用法示例。
在下文中一共展示了Stringy::__toString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generate
/**
* Generate the alelo orders file.
*
* @return string
*/
public function generate()
{
if ($this->productType === null) {
throw new ProductTypeIsRequiredException();
}
$this->header = new HeaderRegistry(['requesterUser' => $this->orderUser, 'orderDate' => (new Carbon())->format('Ymd'), 'orderTime' => (new Carbon())->format('H.i.s')]);
$this->generateTraillerRegistry();
$this->fileLayout = $this->fileLayout->append($this->header->__toString());
$this->fileLayout = $this->fileLayout->append(PHP_EOL);
$this->fileLayout = $this->fileLayout->append($this->headerEletronic->__toString());
$this->fileLayout = $this->fileLayout->append(PHP_EOL);
$this->fileLayout = $this->fileLayout->append($this->branch->__toString());
$this->fileLayout = $this->fileLayout->append(PHP_EOL);
foreach ($this->getAllEmployees() as $employeeRegistry) {
$this->fileLayout = $this->fileLayout->append($employeeRegistry->__toString());
$this->fileLayout = $this->fileLayout->append(PHP_EOL);
}
$this->fileLayout = $this->fileLayout->append($this->traillerRegistry->__toString());
return $this->fileLayout->__toString();
}
示例2: convertToInt
public function convertToInt(Stringy $string)
{
return (int) $string->__toString();
}