1<?php 2 3namespace dokuwiki\plugin\bez\mdl; 4 5class Label extends Entity { 6 protected $id, $name, $count, $added_by, $added_date; 7 8 public static function get_columns() { 9 return array('id', 'name', 'count', 'added_by', 'added_date'); 10 } 11 12 public function __construct($model) { 13 parent::__construct($model); 14 15 $this->validator->set_rules(array( 16 'name' => array(array('length', 100), 'NOT NULL'), 17 )); 18 19 if ($this->id === NULL) { 20 $this->added_by = $this->model->user_nick; 21 $this->added_date = date('c'); 22 } 23 } 24}