/** @param string $aString must be alpanumeric */ function addDerivedProp($name, $type, $readOnly=true, $minValue=null, $maxValue=null, $minLength=0, $maxLength=null, $classDir=null) { if (strlen($name)==0) { trigger_error("addDerivedProp without a name", E_USER_WARNING); return null; } $clsDes = $this->getClassDescriptor(); $prop = new PntDerivedPropertyDescriptor($name, $type, $readOnly, $minValue, $maxValue, $minLength, $maxLength, $classDir); $clsDes->addPropertyDescriptor($prop); return $prop; } |