Booked Scheduler Community Support
February 26, 2020, 08:07:50 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: how to access attribute in mixed object  (Read 304 times)
jan
Newbie
*

Karma: 0
Posts: 18


« on: September 17, 2019, 07:43:36 AM »

for example the object(EmptyReservationSlot).
How can i get the value for 'hours'.
(i know this q was here before but no answer).
thanks, jan

here is the mixed object, from var_dump (formatted by xdebug) at: \booked\lib\Application\Schedule\DisplaySlotFactory.php

C:\xampp\htdocs\booked\lib\Application\Schedule\DisplaySlotFactory.php:84:
object(EmptyReservationSlot)[1249]
  protected '_begin' =>
    object(Date)[1321]
      private 'date' =>
        object(DateTime)[1320]
          public 'date' => string '2019-09-16 18:00:00.000000' (length=26)
          public 'timezone_type' => int 3
          public 'timezone' => string 'Europe/Berlin' (length=13)
      private 'parts' =>
        array (size=7)
          'hours' => string '18' (length=2)
          'minutes' => string '00' (length=2)
          'seconds' => string '00' (length=2)
          'mon' => string '09' (length=2)
          'mday' => string '16' (length=2)
          'year' => string '2019' (length=4)
          'wday' => string '1' (length=1)
      private 'timezone' => string 'Europe/Berlin' (length=13)
      private 'timestring' => string '2019-09-16 18:00:00' (length=19)
      private 'timestamp' => string '1568649600' (length=10)
  protected '_end' =>
    object(Date)[1313]
      private 'date' =>
        object(DateTime)[1324]
          public 'date' => string '2019-09-16 19:00:00.000000' (length=26)
          public 'timezone_type' => int 3
          public 'timezone' => string 'Europe/Berlin' (length=13)
      private 'parts' =>
        array (size=7)
          'hours' => string '19' (length=2)
          'minutes' => string '00' (length=2)
          'seconds' => string '00' (length=2)
          'mon' => string '09' (length=2)
          'mday' => string '16' (length=2)
          'year' => string '2019' (length=4)
          'wday' => string '1' (length=1)
      private 'timezone' => string 'Europe/Berlin' (length=13)
      private 'timestring' => string '2019-09-16 19:00:00' (length=19)
      private 'timestamp' => string '1568653200' (length=10)
  protected '_date' =>
    object(Date)[1262]
      private 'date' =>
        object(DateTime)[1270]
          public 'date' => string '2019-09-16 00:00:00.000000' (length=26)
          public 'timezone_type' => int 3
          public 'timezone' => string 'Europe/Berlin' (length=13)
      private 'parts' =>
        array (size=7)
          'hours' => string '00' (length=2)
          'minutes' => string '00' (length=2)
          'seconds' => string '00' (length=2)
          'mon' => string '09' (length=2)
          'mday' => string '16' (length=2)
          'year' => string '2019' (length=4)
          'wday' => string '1' (length=1)
      private 'timezone' => string 'Europe/Berlin' (length=13)
      private 'timestring' => string '2019-09-16 00:00:00' (length=19)
      private 'timestamp' => string '1568584800' (length=10)
  protected '_isReservable' => boolean true
  protected '_periodSpan' => null
  protected '_beginDisplayTime' =>
    object(Time)[1248]
      private '_hour' => int 18
      private '_minute' => int 0
      private '_second' => int 0
      private '_timezone' => string 'Europe/Berlin' (length=13)
  protected '_endDisplayTime' =>
    object(Time)[1247]
      private '_hour' => int 19
      private '_minute' => int 0
      private '_second' => int 0
      private '_timezone' => string 'Europe/Berlin' (length=13)
  protected '_beginSlotId' => string '15686496005d7fabf844312' (length=23)
  protected '_endSlotId' => string '15686496005d7fabf844312' (length=23)
  protected '_beginPeriod' =>
    object(SchedulePeriod)[1307]
      protected '_begin' =>
        object(Date)[1321]
          private 'date' =>
            object(DateTime)[1320]
              ...
          private 'parts' =>
            array (size=7)
              ...
          private 'timezone' => string 'Europe/Berlin' (length=13)
          private 'timestring' => string '2019-09-16 18:00:00' (length=19)
          private 'timestamp' => string '1568649600' (length=10)
      protected '_end' =>
        object(Date)[1313]
          private 'date' =>
            object(DateTime)[1324]
              ...
          private 'parts' =>
            array (size=7)
              ...
          private 'timezone' => string 'Europe/Berlin' (length=13)
          private 'timestring' => string '2019-09-16 19:00:00' (length=19)
          private 'timestamp' => string '1568653200' (length=10)
      protected '_label' => null
      protected '_id' => string '15686496005d7fabf844312' (length=23)
  protected '_endPeriod' =>
    object(SchedulePeriod)[1307]
      protected '_begin' =>
        object(Date)[1321]
          private 'date' =>
            object(DateTime)[1320]
              ...
          private 'parts' =>
            array (size=7)
              ...
          private 'timezone' => string 'Europe/Berlin' (length=13)
          private 'timestring' => string '2019-09-16 18:00:00' (length=19)
          private 'timestamp' => string '1568649600' (length=10)
      protected '_end' =>
        object(Date)[1313]
          private 'date' =>
            object(DateTime)[1324]
              ...
          private 'parts' =>
            array (size=7)
              ...
          private 'timezone' => string 'Europe/Berlin' (length=13)
          private 'timestring' => string '2019-09-16 19:00:00' (length=19)
          private 'timestamp' => string '1568653200' (length=10)
      protected '_label' => null
      protected '_id' => string '15686496005d7fabf844312' (length=23)
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!