Skip to content

Instantly share code, notes, and snippets.

@dataich
Last active February 13, 2019 11:41
Show Gist options
  • Save dataich/bf428479fdcb9253108d660533c8c1ea to your computer and use it in GitHub Desktop.
Save dataich/bf428479fdcb9253108d660533c8c1ea to your computer and use it in GitHub Desktop.
<?php
class Entry {
const STATUS_DRAFT = 'draft';
const STATUS_PUBLISHED = 'published';
const STATUS_DELETED = 'deleted';
var $status = self::STATUS_DRAFT;
var $title;
public function publish() {
$this->status = self::STATUS_PUBLISHED;
}
public function delete() {
$this->status = self::STATUS_DELETED;
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment