<?php
class Publication
{
// Squirly brakcet defines scope
// everything inbetween the "{" and "}"
// belongs to the class
// declare the "class" "state" variables
// visibility can be "protected" "public" or "private"
public $ad_id
// each "state" varible should have
// "Accessor/Mutator" "methods"
// Mutator here
public function Set_pub_id($value)
{
$this->pub_id = $value;
}
// Accessor here
public function Get_pub_id()
{
return $this->pub_id ;
}
// class function
public function DisplayPublication
{
// do stuff here
}
}