original_string: public function populateObject($object, \stdClass $mapped, $meta=null)
      {
          if (!$meta instanceof Meta) {
              $meta = $this->getMeta($meta ?: get_class($object));
              if (!$meta) {
                  throw new \InvalidArgumentException();
              }
          }
  
          $properties = $meta->getProperties();
          foreach ($mapped as $prop=>$value) {
              if (!isset($properties[$prop])) {
                  throw new \UnexpectedValueException("Property $prop does not exist on class {$meta->class}");
              }
              $property = $properties[$prop];
              if (!isset($property['setter'])) {
                  $object->{$prop} = $value;
              }
              else {
                  // false setter means read only
                  if ($property['setter'] !== false) {
                      call_user_func(array($object, $property['setter']), $value);
                  }
              }
          }
      }
code: public function populateObject($object, \stdClass $mapped, $meta=null)
      {
          if (!$meta instanceof Meta) {
              $meta = $this->getMeta($meta ?: get_class($object));
              if (!$meta) {
                  throw new \InvalidArgumentException();
              }
          }
  
          $properties = $meta->getProperties();
          foreach ($mapped as $prop=>$value) {
              if (!isset($properties[$prop])) {
                  throw new \UnexpectedValueException("Property $prop does not exist on class {$meta->class}");
              }
              $property = $properties[$prop];
              if (!isset($property['setter'])) {
                  $object->{$prop} = $value;
              }
              else {
                  // false setter means read only
                  if ($property['setter'] !== false) {
                      call_user_func(array($object, $property['setter']), $value);
                  }
              }
          }
      }
code_tokens: public function populateObject ( $ object , \ stdClass $ mapped , $ meta = null ) { if ( ! $ meta instanceof Meta ) { $ meta = $ this -> getMeta ( $ meta ? : get_class ( $ object ) ) ; if ( ! $ meta ) { throw new \ InvalidArgumentException ( ) ; } } $ properties = $ meta -> getProperties ( ) ; foreach ( $ mapped as $ prop => $ value ) { if ( ! isset ( $ properties [ $ prop ] ) ) { throw new \ UnexpectedValueException ( "Property $prop does not exist on class {$meta->class}" ) ; } $ property = $ properties [ $ prop ] ; if ( ! isset ( $ property [ 'setter' ] ) ) { $ object -> { $ prop } = $ value ; } else { // false setter means read only if ( $ property [ 'setter' ] !== false ) { call_user_func ( array ( $ object , $ property [ 'setter' ] ) , $ value ) ; } } } }
docstring: Populate an object with row values
  
  @param $meta  Amiss\Meta|string
  @param object $object
  @param array  $mapped Input after mapping to property names and type handling
  @return void
docstring_tokens: Populate an object with row values