original_string: public function setLayoutVariableName($name)
      {
          $name = (string) $name;
          $name = trim($name);
          if (! preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $name)) {
              throw new InvalidArgumentException('Invalid variable name');
          }
          $this->layoutVariableName = $name;
      }
code: public function setLayoutVariableName($name)
      {
          $name = (string) $name;
          $name = trim($name);
          if (! preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $name)) {
              throw new InvalidArgumentException('Invalid variable name');
          }
          $this->layoutVariableName = $name;
      }
code_tokens: public function setLayoutVariableName ( $ name ) { $ name = ( string ) $ name ; $ name = trim ( $ name ) ; if ( ! preg_match ( '/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/' , $ name ) ) { throw new InvalidArgumentException ( 'Invalid variable name' ) ; } $ this -> layoutVariableName = $ name ; }
docstring: Set Layout main variable name
  
  @param string $name
docstring_tokens: Set Layout main variable name