src/Observers/AttributeObserverTrait.php
/**
     * Load's and return's a raw customer entity without primary key but the mandatory members only and nulled values.
     *
     * @param array $data An array with data that will be used to initialize the raw entity with
     *
     * @return array The initialized entity
     */
Load's and return's a raw customer entity without primary key but the mandatory members only and nulled values.
@param array $data An array with data that will be used to initialize the raw entity with

@return array The initialized entity
Load ' s and return ' s a raw customer entity without primary key but the mandatory members only and nulled values . @param array $data An array with data that will be used to initialize the raw entity with @return array The initialized entity
protected function loadRawEntity(array $data = array())
    {
        $callbacks = $this->getCallbacksByType($this->attributeCode);
        foreach ($callbacks as $callback) {
            $this->attributeValue = $callback->handle($this);
        }
        $defaultValue = isset($this->attribute[MemberNames::DEFAULT_VALUE]) ? $this->attribute[MemberNames::DEFAULT_VALUE] : '';
        $value = $this->attributeValue === '' || $this->attributeValue === null ? $defaultValue : $this->attributeValue;
        $castedValue = $this->castValueByBackendType($this->backendType, $value);
        return array_merge(array(MemberNames::VALUE => $castedValue), $data);
    }
protected function loadRawEntity ( array $ data = array ( ) ) { $ callbacks = $ this -> getCallbacksByType ( $ this -> attributeCode ) ; foreach ( $ callbacks as $ callback ) { $ this -> attributeValue = $ callback -> handle ( $ this ) ; } $ defaultValue = isset ( $ this -> attribute [ MemberNames :: DEFAULT_VALUE ] ) ? $ this -> attribute [ MemberNames :: DEFAULT_VALUE ] : '' ; $ value = $ this -> attributeValue === '' || $ this -> attributeValue === null ? $ defaultValue : $ this -> attributeValue ; $ castedValue = $ this -> castValueByBackendType ( $ this -> backendType , $ value ) ; return array_merge ( array ( MemberNames :: VALUE => $ castedValue ) , $ data ) ; }
Load's and return's a raw customer entity without primary key but the mandatory members only and nulled values.
Load ' s and return ' s a raw customer entity without primary key but the mandatory members only and nulled values .
// laod the callbacks for the actual attribute code // invoke the pre-cast callbacks // load the default value // load the value that has to be casted // cast the value // merge the casted value into the passed data and return it