original_string: public function updateTable($meta, ...$args)
      {
          $meta = !$meta instanceof Meta ? $this->mapper->getMeta($meta) : $meta;
          if (!$meta->canUpdate) {
              throw new Exception("Meta {$meta->id} prohibits update");
          }
  
          $query = Query\Update::fromParamArgs($args);
          if (!$query->set) {
              throw new \InvalidArgumentException("Query missing 'set' values");
          }
  
          list ($sql, $params, $setProps, $whereProps) = $query->buildQuery($meta);
          if ($setProps) {
              $params = $this->mapper->formatParams($meta, $setProps, $params);
          }
          if ($whereProps) {
              $params = $this->mapper->formatParams($meta, $whereProps, $params);
          }
  
          return $this->getConnector()->exec($sql, $params);
      }
code: public function updateTable($meta, ...$args)
      {
          $meta = !$meta instanceof Meta ? $this->mapper->getMeta($meta) : $meta;
          if (!$meta->canUpdate) {
              throw new Exception("Meta {$meta->id} prohibits update");
          }
  
          $query = Query\Update::fromParamArgs($args);
          if (!$query->set) {
              throw new \InvalidArgumentException("Query missing 'set' values");
          }
  
          list ($sql, $params, $setProps, $whereProps) = $query->buildQuery($meta);
          if ($setProps) {
              $params = $this->mapper->formatParams($meta, $setProps, $params);
          }
          if ($whereProps) {
              $params = $this->mapper->formatParams($meta, $whereProps, $params);
          }
  
          return $this->getConnector()->exec($sql, $params);
      }
code_tokens: public function updateTable ( $ meta , ... $ args ) { $ meta = ! $ meta instanceof Meta ? $ this -> mapper -> getMeta ( $ meta ) : $ meta ; if ( ! $ meta -> canUpdate ) { throw new Exception ( "Meta {$meta->id} prohibits update" ) ; } $ query = Query \ Update :: fromParamArgs ( $ args ) ; if ( ! $ query -> set ) { throw new \ InvalidArgumentException ( "Query missing 'set' values" ) ; } list ( $ sql , $ params , $ setProps , $ whereProps ) = $ query -> buildQuery ( $ meta ) ; if ( $ setProps ) { $ params = $ this -> mapper -> formatParams ( $ meta , $ setProps , $ params ) ; } if ( $ whereProps ) { $ params = $ this -> mapper -> formatParams ( $ meta , $ whereProps , $ params ) ; } return $ this -> getConnector ( ) -> exec ( $ sql , $ params ) ; }
docstring: Update a table by criteria.
  
  updateTable ( $meta , array $values , $criteria... )
  updateTable ( $meta , Query\Update $query , $criteria... )
  
  @return void
docstring_tokens: Update a table by criteria .