Skip to content

Instantly share code, notes, and snippets.

@ukstudio
Created February 17, 2010 01:42
Show Gist options
  • Select an option

  • Save ukstudio/306190 to your computer and use it in GitHub Desktop.

Select an option

Save ukstudio/306190 to your computer and use it in GitHub Desktop.
<?php
class Entry {
private $title;
private $body;
private $posted_at;
private $author;
public function getTitle() {
return $this->title;
}
public function setTitle($title) {
$this->title = $title;
}
/* setter/getter が続く感じ */
}
$entry = new Entry();
$entry->setTitle("title");
echo $entry->getTitle();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment