Forums / Developer / ezbinaryfile from ez framework / Comment43951
Daniel Guerrier
Tuesday 23 August 2005 7:58:15 pm
Everyone with the answer seems to ignore these question.So after a lot of wasted hours echoing get_class to get return values and printing out all values in arrays that are not documented as a return value to get the available attributes here is the solution.
$class =& eZContentClass::fetchByIdentifier('contentclassname'); $objects =& eZContentObject::fetchSameClassList($class->attribute( 'id' )); $objectData =& $objects[0]->dataMap(); $attribute = $objectData['file']; $binaryFiles =& eZBinaryFile::fetch( $attribute->attribute('id') ); echo($binaryFiles[0]->attribute('download_count'));
Also, here are all the available attributes for the binaryfiletype
Key: 0; Value: contentobject_attribute_id Key: 1; Value: version Key: 2; Value: filename Key: 3; Value: original_filename Key: 4; Value: mime_type Key: 5; Value: download_count Key: 6; Value: filesize Key: 7; Value: filepath Key: 8; Value: mime_type_categoryKey: 9; Value: mime_type_part