I've created a ticket #121 dedicated to this issue
http://code.google.com/p/phpquery/issues/detail?id=121
You can send patch as comment to this issue or attach it on this
group. Best place for it would be a separate plugin (but not script)
particularly it's static namespace. Important thing is also optional
ability to use new data() method to store properties and not pollute
markup. Than this would be possible:
phpQuery::parseStyleSheets($document);
$hasWidth = in_array('width',
array_keys($document['p.my-p']->data('css'))
);
// but this will also be usable
print $document['p.my-p'];
You can read more about plugins here:
http://code.google.com/p/phpquery/wiki/PluginsServerSide
For a quick testing you can use phpQuery::extend() method to add new
methods, which is not yet documented.