original_string: public function registr($place, $controller)
      {
          if (preg_match('/^[a-z0-9]+:[a-z0-9]+:[_a-z0-9]+$/i', $controller)) {
              if (!isset($this->widgets[$place])) {
                  $this->widgets[$place][] = $controller;
              } elseif (!in_array($controller, $this->widgets[$place])) {
                  $this->widgets[$place][] = $controller;
              }
  
              return true;
          }
  
          return false;
      }
code: public function registr($place, $controller)
      {
          if (preg_match('/^[a-z0-9]+:[a-z0-9]+:[_a-z0-9]+$/i', $controller)) {
              if (!isset($this->widgets[$place])) {
                  $this->widgets[$place][] = $controller;
              } elseif (!in_array($controller, $this->widgets[$place])) {
                  $this->widgets[$place][] = $controller;
              }
  
              return true;
          }
  
          return false;
      }
code_tokens: public function registr ( $ place , $ controller ) { if ( preg_match ( '/^[a-z0-9]+:[a-z0-9]+:[_a-z0-9]+$/i' , $ controller ) ) { if ( ! isset ( $ this -> widgets [ $ place ] ) ) { $ this -> widgets [ $ place ] [ ] = $ controller ; } elseif ( ! in_array ( $ controller , $ this -> widgets [ $ place ] ) ) { $ this -> widgets [ $ place ] [ ] = $ controller ; } return true ; } return false ; }
docstring: Regist widget.
  
  Controller example:
  AcmeDemoBundle:Welcome:index
  AcmeArticleBundle:Article:show
  
  @param string $place
  @param string $controller
  
  @return bool
docstring_tokens: Regist widget .