/** * Gets the datatype of this attribute */ function getDatatype() { if ($this->datatype == null) { $datatypeMapper = new DataTypeMapper(); $this->datatype = $datatypeMapper->get($this->getDatatypeId()); } return $this->datatype; }