__toString() публичный метод

Returns the value in $str.
public __toString ( ) : string
Результат string The current value of the $str property
Пример #1
13
 /**
  * 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();
 }
 public function convertToInt(Stringy $string)
 {
     return (int) $string->__toString();
 }