src/Shop/AcumulusEntry.php
protected function get($field)
    {
        $value = null;
        if (is_array($this->record)) {
            // Value may be null: use array_key_exists(), not isset().
            if (array_key_exists($field, $this->record)) {
                $value = $this->record[$field];
            }
        } elseif (is_object($this->record)) {
            // It's an object: try to get the property.
            // Safest way is via the get_object_vars() function.
            $properties = get_object_vars($this->record);
            if (!empty($properties) && array_key_exists($field, $properties)) {
                $value = $properties[$field];
            } elseif (method_exists($this->record, $field)) {
                $value = call_user_func(array($this->record, $field));
            } elseif (method_exists($this->record, '__get')) {
                @$value = $this->record->$field;
            } elseif (method_exists($this->record, '__call')) {
                @$value = $this->record->$field();
            }
        }
        return $value;
    }
protected function get($field)
    {
        $value = null;
        if (is_array($this->record)) {
            // Value may be null: use array_key_exists(), not isset().
            if (array_key_exists($field, $this->record)) {
                $value = $this->record[$field];
            }
        } elseif (is_object($this->record)) {
            // It's an object: try to get the property.
            // Safest way is via the get_object_vars() function.
            $properties = get_object_vars($this->record);
            if (!empty($properties) && array_key_exists($field, $properties)) {
                $value = $properties[$field];
            } elseif (method_exists($this->record, $field)) {
                $value = call_user_func(array($this->record, $field));
            } elseif (method_exists($this->record, '__get')) {
                @$value = $this->record->$field;
            } elseif (method_exists($this->record, '__call')) {
                @$value = $this->record->$field();
            }
        }
        return $value;
    }
protected function get ( $ field ) { $ value = null ; if ( is_array ( $ this -> record ) ) { // Value may be null: use array_key_exists(), not isset(). if ( array_key_exists ( $ field , $ this -> record ) ) { $ value = $ this -> record [ $ field ] ; } } elseif ( is_object ( $ this -> record ) ) { // It's an object: try to get the property. // Safest way is via the get_object_vars() function. $ properties = get_object_vars ( $ this -> record ) ; if ( ! empty ( $ properties ) && array_key_exists ( $ field , $ properties ) ) { $ value = $ properties [ $ field ] ; } elseif ( method_exists ( $ this -> record , $ field ) ) { $ value = call_user_func ( array ( $ this -> record , $ field ) ) ; } elseif ( method_exists ( $ this -> record , '__get' ) ) { @ $ value = $ this -> record -> $ field ; } elseif ( method_exists ( $ this -> record , '__call' ) ) { @ $ value = $ this -> record -> $ field ( ) ; } } return $ value ; }
Returns the value of the given field in the given acumulus entry record.

As different webshops may use different field and property names in their
tables and models, we abstracted accessing a field of a record into this
method.

@param string $field
The field to search for.

@return mixed|null
The value of the given field in this acumulus entry record.
Returns the value of the given field in the given acumulus entry record .