original_string: protected function _registerType($typename)
      {
          // Known type - return its AS name
          if (isset($this->_typesMap[$typename])) {
              return $this->_typesMap[$typename];
          }
  
          // Standard types
          if (in_array($typename, array('void', 'null', 'mixed', 'unknown_type'))) {
              return 'Unknown';
          }
  
          // Arrays
          if ('array' == $typename) {
              return 'Unknown[]';
          }
  
          if (in_array($typename, array('int', 'integer', 'bool', 'boolean', 'float', 'string', 'object', 'Unknown', 'stdClass'))) {
              return $typename;
          }
  
          // Resolve and store AS name
          $asTypeName = $this->_phpTypeToAS($typename);
          $this->_typesMap[$typename] = $asTypeName;
  
          // Create element for the name
          $typeEl = $this->_xml->createElement('type');
          $typeEl->setAttribute('name', $asTypeName);
          $this->_addClassAttributes($typename, $typeEl);
          $this->_types->appendChild($typeEl);
  
          return $asTypeName;
      }
code: protected function _registerType($typename)
      {
          // Known type - return its AS name
          if (isset($this->_typesMap[$typename])) {
              return $this->_typesMap[$typename];
          }
  
          // Standard types
          if (in_array($typename, array('void', 'null', 'mixed', 'unknown_type'))) {
              return 'Unknown';
          }
  
          // Arrays
          if ('array' == $typename) {
              return 'Unknown[]';
          }
  
          if (in_array($typename, array('int', 'integer', 'bool', 'boolean', 'float', 'string', 'object', 'Unknown', 'stdClass'))) {
              return $typename;
          }
  
          // Resolve and store AS name
          $asTypeName = $this->_phpTypeToAS($typename);
          $this->_typesMap[$typename] = $asTypeName;
  
          // Create element for the name
          $typeEl = $this->_xml->createElement('type');
          $typeEl->setAttribute('name', $asTypeName);
          $this->_addClassAttributes($typename, $typeEl);
          $this->_types->appendChild($typeEl);
  
          return $asTypeName;
      }
code_tokens: protected function _registerType ( $ typename ) { // Known type - return its AS name if ( isset ( $ this -> _typesMap [ $ typename ] ) ) { return $ this -> _typesMap [ $ typename ] ; } // Standard types if ( in_array ( $ typename , array ( 'void' , 'null' , 'mixed' , 'unknown_type' ) ) ) { return 'Unknown' ; } // Arrays if ( 'array' == $ typename ) { return 'Unknown[]' ; } if ( in_array ( $ typename , array ( 'int' , 'integer' , 'bool' , 'boolean' , 'float' , 'string' , 'object' , 'Unknown' , 'stdClass' ) ) ) { return $ typename ; } // Resolve and store AS name $ asTypeName = $ this -> _phpTypeToAS ( $ typename ) ; $ this -> _typesMap [ $ typename ] = $ asTypeName ; // Create element for the name $ typeEl = $ this -> _xml -> createElement ( 'type' ) ; $ typeEl -> setAttribute ( 'name' , $ asTypeName ) ; $ this -> _addClassAttributes ( $ typename , $ typeEl ) ; $ this -> _types -> appendChild ( $ typeEl ) ; return $ asTypeName ; }
docstring: Register new type on the system
  
  @param  string $typename type name
  @return string New type name
docstring_tokens: Register new type on the system