Skip to content

Instantly share code, notes, and snippets.

@zgulde
Last active August 4, 2016 16:13
Show Gist options
  • Select an option

  • Save zgulde/d7639392daed6c7af72ddeab6080754c to your computer and use it in GitHub Desktop.

Select an option

Save zgulde/d7639392daed6c7af72ddeab6080754c to your computer and use it in GitHub Desktop.

Classes and Objects I

Classes

  • Naming Convention
  • Functions
  • $this
  • The Public Keyword

Constructors and Destructors

  • Constructors
  • Destructors
  • Magic Methods

Static Methods and Properties

  • Static Properties
  • Static Methods
  • The self Keyword

PHP with MySQL

Connect to MySQL

  • Using PDO
  • Connecting to MySQL via PDO

Query the DB

  • Using PDO to Execute Queries
  • Last Insert ID

Query and Results

  • Retrieving Data
  • Using query() and PDOStatement
  • Results Metadata
  • Fetching Row(s)

Prepared Statements

  • Dynamic Queries and User Input
  • The Trouble with Quotes
  • Question Mark Parameters
  • Binding Values Directly
  • Named Parameters
  • Using bindValue()

Classes and Objects II

Inheritance

  • Using Inheritance
  • More on Inheritance

Intro to Magic Methods

  • Using __get() and __set()
  • __set()
  • __get()

Inheritance and Overriding

  • Examples of Overriding
  • Calling Parent Methods

Visibility

  • Using Visibility
  • Getters and Setters
  • Setters
  • Getters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment