private function setDataForSubEntitiy($propertyKey, $value)
    {
        $subKey = strtolower(strstr($propertyKey, '_', true));
        $getterMethodName = 'get' . ucfirst($subKey);

        if (!empty($subKey) && method_exists($this, $getterMethodName)) {
            $subObject = $this->$getterMethodName();

            // If we managed to get sub object, set his data
            if ($subObject instanceof EntityAbstract) {
                $subObject->setDataFromArray(
                    array($propertyKey => $value)
                );
            }
        }
    }
private function setDataForSubEntitiy($propertyKey, $value)
    {
        $subKey = strtolower(strstr($propertyKey, '_', true));
        $getterMethodName = 'get' . ucfirst($subKey);

        if (!empty($subKey) && method_exists($this, $getterMethodName)) {
            $subObject = $this->$getterMethodName();

            // If we managed to get sub object, set his data
            if ($subObject instanceof EntityAbstract) {
                $subObject->setDataFromArray(
                    array($propertyKey => $value)
                );
            }
        }
    }
private function setDataForSubEntitiy ( $ propertyKey , $ value ) { $ subKey = strtolower ( strstr ( $ propertyKey , '_' , true ) ) ; $ getterMethodName = 'get' . ucfirst ( $ subKey ) ; if ( ! empty ( $ subKey ) && method_exists ( $ this , $ getterMethodName ) ) { $ subObject = $ this -> $ getterMethodName ( ) ; // If we managed to get sub object, set his data if ( $ subObject instanceof EntityAbstract ) { $ subObject -> setDataFromArray ( array ( $ propertyKey => $ value ) ) ; } } }
Process sub entity to set data recursively

@param string $propertyKey
@param mixed $value

@return void
Process sub entity to set data recursively