src/CRUDlex/Entity.php
public function get($field)
    {
        if ($this->definition->getField($field, 'value') !== null) {
            return $this->definition->getField($field, 'value');
        }

        if (!array_key_exists($field, $this->entity)) {
            return null;
        }

        $type  = $this->definition->getType($field);
        $value = $this->toType($this->entity[$field], $type);
        return $value;
    }
public function get($field)
    {
        if ($this->definition->getField($field, 'value') !== null) {
            return $this->definition->getField($field, 'value');
        }

        if (!array_key_exists($field, $this->entity)) {
            return null;
        }

        $type  = $this->definition->getType($field);
        $value = $this->toType($this->entity[$field], $type);
        return $value;
    }
public function get ( $ field ) { if ( $ this -> definition -> getField ( $ field , 'value' ) !== null ) { return $ this -> definition -> getField ( $ field , 'value' ) ; } if ( ! array_key_exists ( $ field , $ this -> entity ) ) { return null ; } $ type = $ this -> definition -> getType ( $ field ) ; $ value = $ this -> toType ( $ this -> entity [ $ field ] , $ type ) ; return $ value ; }
Gets the value of a field in its specific type.

@param string $field
the field

@return mixed
null on invalid field, an integer if the definition says that the
type of the field is an integer, a boolean if the field is a boolean or
else the raw value
Gets the value of a field in its specific type .