Overview

Namespaces

  • SpanishGuestReportGenerator
    • Util

Classes

  • AbstractFactory
  • Guest
  • GuestFactory
  • GuestReport
  • Hotel
  • HotelFactory

Traits

  • FormatterTrait
  • SanitizerTrait

Exceptions

  • FactoryException
  • GuestReportException
  • Overview
  • Namespace
  • Class

      Class GuestReport

      Guest Report

      SpanishGuestReportGenerator\GuestReport uses SpanishGuestReportGenerator\FormatterTrait, SpanishGuestReportGenerator\SanitizerTrait
      Namespace: SpanishGuestReportGenerator
      Package: Spanish
      Copyright: 2021 Javier Zapata javierzapata82@gmail.com
      License: The MIT License
      Author: Javier Zapata javierzapata82@gmail.com
      Link: https://github.com/bahiazul/spanish-guest-report-generator
      Located at GuestReport.php
      Methods summary
      public
      # __construct( SpanishGuestReportGenerator\HotelFactory $hotelFactory, SpanishGuestReportGenerator\GuestFactory $guestFactory, DateTime $reportDateTime = null )

      Creates a new report

      Creates a new report

      Parameters

      $hotelFactory
      Hotel creator class
      $guestFactory
      Guest creator class
      $reportDateTime
      Date and time of the report
      public SpanishGuestReportGenerator\GuestReport
      # setChainCode( string $chainCode )

      Sets the Chain's code

      Sets the Chain's code

      Parameters

      $chainCode

      Returns

      SpanishGuestReportGenerator\GuestReport
      public SpanishGuestReportGenerator\GuestReport
      # setChainName( string $chainName )

      Sets the Chain's name

      Sets the Chain's name

      Parameters

      $chainName
      Chain name

      Returns

      SpanishGuestReportGenerator\GuestReport
      public SpanishGuestReportGenerator\GuestReport
      # setReportNumber( mixed $reportNumber )

      Sets the report number

      Sets the report number

      Parameters

      $reportNumber
      Report number

      Returns

      SpanishGuestReportGenerator\GuestReport
      public SpanishGuestReportGenerator\GuestReport
      # setReportDateTime( DateTime $reportDateTime )

      Sets the Date and time of the report

      Sets the Date and time of the report

      Parameters

      $reportDateTime
      Date and time of the report

      Returns

      SpanishGuestReportGenerator\GuestReport
      public SpanishGuestReportGenerator\GuestReport
      # setChain( string $chainCode, string $chainName, DateTime $reportDateTime, array $hotels = [] )

      Sets the info and contents for the Chain

      Sets the info and contents for the Chain

      Parameters

      $chainCode
      Code of the Chain
      $chainName
      Name of the Chain
      $reportDateTime
      Date and Time of report
      $hotels
      Hotels that belong to this Chain

      Returns

      SpanishGuestReportGenerator\GuestReport
      public SpanishGuestReportGenerator\GuestReport
      # setHotels( array $hotels )

      Set multiple Hotels at once

      Set multiple Hotels at once

      Parameters

      $hotels
      Hotels

      Returns

      SpanishGuestReportGenerator\GuestReport
      public SpanishGuestReportGenerator\GuestReport
      # setHotel( string $hotelCode, string $hotelName, DateTime $reportDateTime = null, array $guests = [] )

      Sets the info and contents for a single Hotel

      Sets the info and contents for a single Hotel

      Parameters

      $hotelCode
      Code of the Hotel
      $hotelName
      Name of the Hotel
      $reportDateTime
      Date and Time of report
      $guests
      Guests that belong to this Hotel

      Returns

      SpanishGuestReportGenerator\GuestReport
      public SpanishGuestReportGenerator\GuestReport
      # setHotelGuests( string $hotelCode, array $guests )

      Set the Guests for a specific Hotel

      Set the Guests for a specific Hotel

      Parameters

      $hotelCode
      Code of the Hotel
      $guests
      Guests that belong to this Hotel

      Returns

      SpanishGuestReportGenerator\GuestReport

      Throws

      SpanishGuestReportGenerator\GuestReportException
      public SpanishGuestReportGenerator\GuestReport
      # setDirectoryPath( string $path, boolean $create = true )

      Sets the path in which the generated file will be saved

      Sets the path in which the generated file will be saved

      Parameters

      $path
      Destination path
      $create
      Create the path if it does not exist

      Returns

      SpanishGuestReportGenerator\GuestReport

      Throws

      SpanishGuestReportGenerator\GuestReportException
      public string
      # getFilename( )

      Returns the output filename

      Returns the output filename

      Returns

      string
      Output filename
      public boolean
      # save( boolean $overwrite = true )

      Save the report to a file

      Save the report to a file

      Parameters

      $overwrite
      Overwrite the file if already exists

      Returns

      boolean
      Whether the file was succesfully saved

      Throws

      SpanishGuestReportGenerator\GuestReportException
      Constants summary
      string FILE_NEWLINE

      Newline character to use

      Newline character to use

      # "\r\n"
      string FILE_ENCODING

      Character encoding to use

      Character encoding to use

      # 'CP437'
      string FIELD_DELIMITER

      Delimiter for all the fields in the document

      Delimiter for all the fields in the document

      # '|'
      integer ROW_TYPE

      First digit for the Chain info line

      First digit for the Chain info line

      # 0
      API documentation generated by ApiGen