khanat-opennel-code/code/web/app/app_achievements/class/InDev_trait.php

33 lines
541 B
PHP
Raw Normal View History

<?php
trait InDev {
2012-07-02 16:55:13 +00:00
/*---------------------------
This trait provides basic functionality used to
handle "in development" flags.
---------------------------*/
protected $dev;
final function inDev() {
return ($this->dev == 1);
}
final function getDev() {
return $this->dev;
}
2012-07-02 16:55:13 +00:00
final function setInDev($tf) {
2012-07-02 16:55:13 +00:00
if($tf == true) {
$this->setDev(1);
}
else {
$this->setDev(0);
}
$this->update();
}
final function setDev($d) {
2012-07-02 16:55:13 +00:00
$this->dev = $d;
}
}
?>