PHP midgard_collector method add_value_property
Adds property name to collector's values.
bool add_value_property(string 'value');
midgard_collector method add_value_property takes one parameter:
- value, property name for which value should be returned
Returns TRUE if value was succesfully added to collector, otherwise returns FALSE.
Midgard 1.8.1 Referenced properties can also be added as value properties.
Cases to return FALSE:
- Value property is not registered for the classname for which collector object has been initialized
- Value property been already added to collector's instance.
More details about fails can be found in midgard-core docs.
Example
<?php
/* Select all name and extra corresponding fields of midgard_topic where
* up is equal to $id. Additionally all guid fields are set as collector's
* keys.
*/
$mc = new midgard_collector("midgard_topic", "up", $id);
$mc->set_key_property("guid");
$mc->add_value_property("name");
$mc->add_value_property("extra");
$mc->execute();
?>
