Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

added some comments and clean up the code

  • Loading branch information...
commit c5efa9d6ed5c1e0ab78265cf85e067c85f15c74f 1 parent 2a8ca44
Marc Sygrove authored

Showing 1 changed file with 12 additions and 14 deletions. Show diff stats Hide diff stats

  1. +12 14 controllers/twilio.php
26 controllers/twilio.php
@@ -12,23 +12,21 @@ class Twilio extends CI_Controller {
12 12
13 13 function __construct() {
14 14 try {
15   -
16   - $this->load->library( 'twilio_services' );
17   - $thisMonth = date( 'Y-m-d', mktime( 3, 0, 0, date( 'm' ), 1, date( 'Y' ) ) );
18   -
19   - foreach ( $this->twilio_services->account->calls->getIterator( 0, 50, array(
20   - "Status" => "completed",
21   - "StartTime>" => $thisMonth
22   - ) ) as $call
23   - ) {
24   - print ' $call->direction: ' . $call->direction . ' date_created:' . $call->date_created . ' $call->from: ' . $call->from . ' $call->to: ' . $call->to . '<br/>';
25   - }
26   -
27   -
  15 + // load the library
  16 + $this->load->library( 'twilio_services' );
  17 + $thisMonth = date( 'Y-m-d', mktime( 3, 0, 0, date( 'm' ), 1, date( 'Y' ) ) );
  18 +
  19 + // get all the call from the 1st of the month
  20 + foreach ( $this->twilio_services->account->calls->getIterator( 0, 50, array(
  21 + "Status" => "completed",
  22 + "StartTime>" => $thisMonth
  23 + ) ) as $call
  24 + ) {
  25 + print ' $call->direction: ' . $call->direction . ' date_created:' . $call->date_created . ' $call->from: ' . $call->from . ' $call->to: ' . $call->to . '<br/>';
  26 + }
28 27 } catch( Exception $e ) {
29 28 print $e->getMessage();
30 29 }
31   -
32 30 }
33 31 }
34 32

0 comments on commit c5efa9d

Please sign in to comment.
Something went wrong with that request. Please try again.