Instantiating objects with many attributes
Martin Fowler's bible book Refactoring does identify a smell called "Long Parameter List" (p78) and proposes the following refactorings:


Replace Parameter with Method (p292)
Introduce Parameter Object (295)
Preserve Whole Object (298)


Of these I think that "Introduce Parameter Object" would best suit:

You'd wrap the attributes up in their own object and pass that to the constructor.  You may face the same issue with the new object if you choose to bundle all the values directly into its' constructor, though you could use setters instead of parameters in that object.

To illustrate (sorry, my PHP-fu is weak):

$params = new OpenIDParams();
$params-&gt;setSomething( $imgPath . $name . $ext );
$params-&gt;setSomethingElse( 'openid_highlight' );




$params-&gt;setName( $name );

$op = new OpenIdProvider( $params );


This is a little more verbose but it addresses your concern about not being clear about the attributes' purpose / meaning.  Also it'll be a little less painful to add extra attributes into the equation later.