src/ORM/FieldType/DBComposite.php
public function getField($field)
    {
        // Skip invalid fields
        $fields = $this->compositeDatabaseFields();
        if (!isset($fields[$field])) {
            return null;
        }

        // Check bound object
        if ($this->record instanceof DataObject) {
            $key = $this->getName() . $field;
            return $this->record->getField($key);
        }

        // Check local record
        if (isset($this->record[$field])) {
            return $this->record[$field];
        }
        return null;
    }
public function getField($field)
    {
        // Skip invalid fields
        $fields = $this->compositeDatabaseFields();
        if (!isset($fields[$field])) {
            return null;
        }

        // Check bound object
        if ($this->record instanceof DataObject) {
            $key = $this->getName() . $field;
            return $this->record->getField($key);
        }

        // Check local record
        if (isset($this->record[$field])) {
            return $this->record[$field];
        }
        return null;
    }
public function getField ( $ field ) { // Skip invalid fields $ fields = $ this -> compositeDatabaseFields ( ) ; if ( ! isset ( $ fields [ $ field ] ) ) { return null ; } // Check bound object if ( $ this -> record instanceof DataObject ) { $ key = $ this -> getName ( ) . $ field ; return $ this -> record -> getField ( $ key ) ; } // Check local record if ( isset ( $ this -> record [ $ field ] ) ) { return $ this -> record [ $ field ] ; } return null ; }
get value of a single composite field

@param string $field
@return mixed
get value of a single composite field