X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fpq-gateway;a=blobdiff_plain;f=lib%2Fpq%2FMapper%2FPropertyInterface.php;h=b53e2b8976749737d1a33e8dc5e239bca9610c56;hp=da6ccd32e9ddd4da6c90887fd33b25259367119a;hb=05a907a5cb7377e2ad7abfa21096e3630752b944;hpb=d4d84fb9b85f0216bd611946d59054a606c71960 diff --git a/lib/pq/Mapper/PropertyInterface.php b/lib/pq/Mapper/PropertyInterface.php index da6ccd3..b53e2b8 100644 --- a/lib/pq/Mapper/PropertyInterface.php +++ b/lib/pq/Mapper/PropertyInterface.php @@ -6,18 +6,66 @@ use pq\Gateway\Row; interface PropertyInterface { + /** + * Write the value for the property from $object into the row to update + * @param object $object + * @param Row $rowToUpdate + * @return null|callable eventual deferred callback + */ function write($object, Row $rowToUpdate); + + /** + * Read the value for the property from $row into the mapped object + * @param Row $row + * @param object $objectToUpdate + * @return null|callable eventual deferred callback + */ function read(Row $row, $objectToUpdate); + /** + * Set the value of the mapped property + * @param object $object + * @param mixed $value + */ function assign($object, $value); + + /** + * Get the value of the mapped property + * @param object $object + * @return mixed + */ function extract($object); + /** + * Get the property name + * @return string + */ function getProperty(); + /** + * Get the containing map + * @return MapInterface + */ function getContainer(); + + /** + * Set the containing map + * @param MapInterface $container + * @return Property + */ function setContainer(MapInterface $container); + /** + * Check whether this Property defines $property + * @param string $property + * @return bool + */ function defines($property); - function exposes($field); + /** + * Check whether this property exposes $field + * @param string $field + * @return bool + */ + function exposes($field); }