public static function fromProperties(array $properties)
    {
        $copy = new self();
        foreach (self::getPropertyNames() as $name) {
            if (isset($properties[$name])) {
                $copy->{'set'.ucfirst($name)}($properties[$name]);
            }
        }

        return $copy;
    }
public static function fromProperties(array $properties)
    {
        $copy = new self();
        foreach (self::getPropertyNames() as $name) {
            if (isset($properties[$name])) {
                $copy->{'set'.ucfirst($name)}($properties[$name]);
            }
        }

        return $copy;
    }
public static function fromProperties ( array $ properties ) { $ copy = new self ( ) ; foreach ( self :: getPropertyNames ( ) as $ name ) { if ( isset ( $ properties [ $ name ] ) ) { $ copy -> { 'set' . ucfirst ( $ name ) } ( $ properties [ $ name ] ) ; } } return $ copy ; }
Create message from array of properties

@param array $properties An assoc array of [property => value]

@return CustomAmqpMessage

@see getPropertyNames()
Create message from array of properties