original_string: public function setDataFromArray(array $data)
      {
          foreach ($data as $property => $value) {
              $method = 'set' . ucfirst($property);
              if (method_exists($this, $method)) {
                  $this->{$method}($value);
              } else {
                  throw new \Parable\Routing\Exception(
                      "Tried to set non-existing property '{$property}' with value '{$value}' on " . get_class($this)
                  );
              }
          }
  
          $this->checkValidProperties();
          $this->parseUrlParameters();
  
          return $this;
      }
code: public function setDataFromArray(array $data)
      {
          foreach ($data as $property => $value) {
              $method = 'set' . ucfirst($property);
              if (method_exists($this, $method)) {
                  $this->{$method}($value);
              } else {
                  throw new \Parable\Routing\Exception(
                      "Tried to set non-existing property '{$property}' with value '{$value}' on " . get_class($this)
                  );
              }
          }
  
          $this->checkValidProperties();
          $this->parseUrlParameters();
  
          return $this;
      }
code_tokens: public function setDataFromArray ( array $ data ) { foreach ( $ data as $ property => $ value ) { $ method = 'set' . ucfirst ( $ property ) ; if ( method_exists ( $ this , $ method ) ) { $ this -> { $ method } ( $ value ) ; } else { throw new \ Parable \ Routing \ Exception ( "Tried to set non-existing property '{$property}' with value '{$value}' on " . get_class ( $ this ) ) ; } } $ this -> checkValidProperties ( ) ; $ this -> parseUrlParameters ( ) ; return $ this ; }
docstring: Set data from array. Can only set values that have a corresponding setProperty method.
  
  @param array $data
  
  @return $this
  @throws \Parable\Routing\Exception
docstring_tokens: Set data from array . Can only set values that have a corresponding setProperty method .