public function reqGetRentsByDate( $date ) { $date = new ActiveRecord\DateTime($date); $shift = Shift::find( array('shiftDate'=>$date) ); $rents = Rent::all( array('idShift'=>$shift->id) ); $rents = $this->buildRents($rents); return $rents; }