--- /dev/null
+<?php
+ class Version extends AppModel {
+ public $validate = array(
+ /*'fqdn' => array(
+ 'rule' => 'notEmpty'
+ ),*/
+ /*'nom' => array(
+ 'rule' => 'notEmpty'
+ ),*/
+ 'valeur' => array(
+ 'rule' => 'notEmpty'
+ )
+ );
+
+ public function value($field, $value = null) {
+ if(func_num_args() === 1){
+ $result = $this->field($field);
+ if($result){
+ return $result;
+ }
+ } else {
+ if($this->saveField($field, $value)) {
+ return true;
+ }
+ }
+ return false;
+ }
+ }
+?>