02.06.2013 Views

Pro PHP and jQuery by Jason Lengstorf.pdf - Computer Science ...

Pro PHP and jQuery by Jason Lengstorf.pdf - Computer Science ...

Pro PHP and jQuery by Jason Lengstorf.pdf - Computer Science ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

■ Note For the sake of brevity, DocBlocks will be left out of repeated code snippets.<br />

According to the original planning, the class properties are as follows:<br />

CHAPTER 4 ■ BUILD AN EVENTS CALENDAR<br />

• $_useDate: The date to use when building the calendar in YYYY-MM-DD HH:MM:SS<br />

format<br />

• $_m: The month to use when building the calendar<br />

• $_y: The year to use when building the calendar<br />

• $_daysInMonth: How many days are in the current month<br />

• $_startDay: Index from 0–6 representing on what day of the week the month starts<br />

Building the Constructor<br />

Next, you can build the class constructor. Start out <strong>by</strong> declaring it:<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!