src/Didww/API2/Object.php
public function fromArray($array)
    {
        $result = array();
        foreach ($array as $key => $value) {
            $property = \Didww\Utils\StringUtil::camelCase($key);

            $setter = "set" . ucfirst($property);

            if (method_exists($this, $setter)) {
                $this->{$setter}($value);
                continue;
            }

            if (property_exists($this, $property)) {
                $this->{$property} = $value;
                continue;
            }


            if (self::ASSIGN_CREATE == $this->_assignType) {
                $this->{$property} = $value;
                continue;
            }
            $result[$property] = $value;
            if (self::ASSIGN_STRICT == $this->_assignType) {
                trigger_error("Property is undefined: $property");
            }
        }
        return $result;

    }
public function fromArray($array)
    {
        $result = array();
        foreach ($array as $key => $value) {
            $property = \Didww\Utils\StringUtil::camelCase($key);

            $setter = "set" . ucfirst($property);

            if (method_exists($this, $setter)) {
                $this->{$setter}($value);
                continue;
            }

            if (property_exists($this, $property)) {
                $this->{$property} = $value;
                continue;
            }


            if (self::ASSIGN_CREATE == $this->_assignType) {
                $this->{$property} = $value;
                continue;
            }
            $result[$property] = $value;
            if (self::ASSIGN_STRICT == $this->_assignType) {
                trigger_error("Property is undefined: $property");
            }
        }
        return $result;

    }
load object properties from array
@param array $array
@return array unused array elements