Nunca antes había escrito una clase de php desde cero. Pero supongo que tienes que empezar por algún lado, ¿verdad? Tengo una idea, pero necesito ayuda con la lógica. Por favor, dígame lo que usted piensa. A continuación hay una taquigrafía obviamente. En las etapas de planificación.
Class - 
 -> type (recurring, single, day)
 -> Recurring days (4,2,3,4,1,2....etc. for odd schedules- need even pairs)
 -> Shift Type (onshift, vacation, medical, etc...)
 -> Emp Id
 -> Start
 -> End
 -> Location Id
 -> Hours per day
 -> Day start time
 get schedule ( by account/location/company/unit/crew/individual )
      select single entries
      separate array into days (1 day) increments
      if single entries have linking day entries, replace array with day entry information
      return mysql array of days for the time period;
 set schedule ( dates, emp id)
      if recurring
          if already exisits || conflicts with existing
              error
          create recurring template in db table
          create single db entries using recurring days for 1 year
      if single
          if date is between dates already in db || more than 1 year out
              error
          else
              insert into db
      if day
          if no existing single range
             error
          else
             insert into db under day table, with id linking to id of existing single.
 remove recurringOnly(emp id)
      delete all entries with recurring id
 remove all entries( from this date forward, emp id )
      delete entries with start date > date
 cronUpdate( cron start / end dates)
      if cron start / end dates
           delete anything with dates bigger than nextUpdate (to make sure no errors)
           select recurring db entries with nextUpdate between cron start/ end
           insert into db the next set of "recurring days" for the employee
           update nextUpdate date for employee
      else - error

Respuestas:
Los primeros datos que enumeró podrían ser los atributos. Recuerde establecer los atributos como privados y el método getters y setters public. Luego puede crear los métodos basados en estos algoritmos que ya tiene. Es una buena idea codificar su clase en un solo archivo con el mismo nombre que su clase para ayudar a organizar su proyecto.
fuente