Get this collection as a typemap that can be used in PHP's \SoapClient

@return array
558907
public function getTypemap()
    {
        $typemap = array();

        foreach ($this->converters as $converter) {
            $typemap[] = array(
                'type_name' => $converter->getTypeName(),
                'type_ns'   => $converter->getTypeNamespace(),
                'from_xml'  => function($input) use ($converter) {
                    return $converter->convertXmlToPhp($input);
                },
                'to_xml'    => function($input) use ($converter) {
                    return $converter->convertPhpToXml($input);
                },
            );
        }

        return $typemap;
    }
1134863
protected function buildPropertyMap()
    {
        $map = [];
        $properties = (new ReflectionObject($this))->getProperties(ReflectionProperty::IS_PUBLIC);

        foreach ($properties as $property) {
            $map[$property->getName()] = $property;
        }

        return $map;
    }
97289
public function toArray(): array
    {
        $type = $this->getType();

        if (empty($type)) {
            throw new InvalidException('Type has to be set');
        }

        return [$type->getName() => $this->_mapping];
    }
925600
protected function getTypes()
    {
        return array(
            self::CLASS_NAME,
            self::CSS_SELECTOR,
            self::ID,
            self::NAME,
            self::LINK_TEXT,
            self::PARTIAL_LINK_TEXT,
            self::TAG_NAME,
            self::XPATH
        );
    }
595241
protected function getRawIncludeMap(): array
    {
        $map = [];

        foreach ($this->includes as $includeKey => $definition) {
            if (\is_int($includeKey)) {
                $includeKey = $definition;
                $definition = null;
            }

            $settings = [];
            if (!empty($definition)) {
                $parts = preg_split('/\s*\|\s*/', $definition);
                foreach ($parts as $part) {
                    if (!preg_match('/^([^:]+)(:(.+))?$/', $part, $match)) {
                        throw new ParseDefinitionException("Unable to parse field definition for '{$includeKey}''");
                    }
                    // If only list() was viable ...
                    $directive = $match[1];
                    $val = $match[3] ?? null;
                    switch ($directive) {
                        case 'default':
                            $settings['default'] = true;
                            break;
                        case 'relation':
                            $settings['relation'] = !empty($val) ?
                                preg_split('/s*,\s*/', $val) : [$includeKey];
                            break;
                        case 'method':
                            if (!empty($val)) {
                                $settings['method'] = $val;
                            }
                            break;
                        case 'item':
                            $settings['resource_type'] = 'item';
                            break;
                        case 'collection':
                            $settings['resource_type'] = 'collection';
                            break;
                        default:
                            throw new ParseDefinitionException("Invalid key '{$directive}' for {$includeKey}");
                    }
                }
            }

            if (!isset($settings['relation'])) {
                $settings['relation'] = [];
            }
            if (!isset($settings['method'])) {
                $settings['method'] = 'include'.StrHelper::studlyCase($includeKey);
            }
            if (!isset($settings['default'])) {
                $settings['default'] = false;
            }
            if (!isset($settings['resource_type'])) {
                $settings['resource_type'] = null;
            }

            $map[$includeKey] = $settings;
        }

        return $map;
    }
771257
protected function _getTypes() {
		$handle = new File(FILE_CACHE . 'mime_types.txt', true, 0770);
		if (!$handle->exists()) {
			# create and fill: ext||type||name||img (array serialized? separated by ||?)
			$MimeTypes = TableRegistry::get('Data.MimeTypes');
			$mimeTypes = $MimeTypes->find('all', ['fields' => ['name', 'ext', 'type', 'MimeTypeImages.name', 'MimeTypeImages.ext'], 'conditions' => ['MimeTypes.active' => 1], 'contain' => ['MimeTypeImages']]);

			$content = [];
			foreach ($mimeTypes as $m) {
				$img = (!empty($m->mime_type_image['ext']) ? $m->mime_type_image['name'] . '.' . $m->mime_type_image['ext'] : '');
				$content[] = [
					'ext' => $m['ext'],
					'name' => $m['name'],
					'type' => $m['type'],
					'img' => $img,
				];
			}
			# add special types? (file not found icon, default fallback icon, generic file ext icon...)

			if (!$handle->write(serialize($content), 'w', true)) {
				throw new Exception('Write error');
			}
		} else {
			$content = $handle->read();
			if ($content === false) {
				return [];
			}
			$content = unserialize($content);
			if ($content === false || !is_array($content)) {
				return [];
			}
		}
		return $content;
	}
1354440
public function getTypes()
    {
        $schema = StaticSchema::inst();
        $tree = array_merge(
            [$this->rootClass],
            $schema->getDescendants($this->rootClass)
        );

        return array_map(function ($class) use ($tree, $schema) {
            return $schema->typeNameForDataObject($class);
        }, $tree);
    }
1010161
public function getTypes() {
    // No type specified means type is mixed.
    $types = ['mixed'];
    // Use types from the doc comment if available.
    $doc_comment = $this->getDocComment();
    if (!$doc_comment) {
      return $types;
    }
    $doc_block = $doc_comment->getDocBlock();
    $var_tags = $doc_block->getTagsByName('var');
    if (empty($var_tags)) {
      return $types;
    }
    /** @var \phpDocumentor\Reflection\DocBlock\Tag\VarTag $var_tag */
    $var_tag = reset($var_tags);
    return Types::normalize($var_tag->getTypes());
  }
1371007
public static function GetMimeTypeMapForExt () {
		return [
			IExtension::EXTENSION_TXT	=> static::MIME_TYPE_TEXT,
			IExtension::EXTENSION_TEXT	=> static::MIME_TYPE_TEXT,
			IExtension::EXTENSION_HTML	=> static::MIME_TYPE_HTML,
			IExtension::EXTENSION_HTM	=> static::MIME_TYPE_HTML,
			IExtension::EXTENSION_XML	=> static::MIME_TYPE_XML,
			IExtension::EXTENSION_JS	=> static::MIME_TYPE_JS,
			IExtension::EXTENSION_JSON	=> static::MIME_TYPE_JSON,
			IExtension::EXTENSION_VBS	=> static::MIME_TYPE_VBS,
			IExtension::EXTENSION_CSS	=> static::MIME_TYPE_CSS,
			IExtension::EXTENSION_CSV	=> static::MIME_TYPE_COMMA_SEPARATED_VALUES,
			IExtension::EXTENSION_XLS	=> static::MIME_TYPE_MS_EXCEL,
			IExtension::EXTENSION_GIF	=> static::MIME_TYPE_GIF,
			IExtension::EXTENSION_JPG	=> static::MIME_TYPE_JPG,
			IExtension::EXTENSION_JPEG	=> static::MIME_TYPE_JPG,
			IExtension::EXTENSION_PNG	=> static::MIME_TYPE_PNG,
			IExtension::EXTENSION_CGI	=> static::MIME_TYPE_CGI,
			IExtension::EXTENSION_DOC	=> static::MIME_TYPE_DOC,
			IExtension::EXTENSION_PDF	=> static::MIME_TYPE_PDF,
			IExtension::EXTENSION_MP3	=> static::MIME_TYPE_MP3,
			IExtension::EXTENSION_MP4	=> static::MIME_TYPE_MPG,
			IExtension::EXTENSION_MPG	=> static::MIME_TYPE_MPG,
			IExtension::EXTENSION_MPEG	=> static::MIME_TYPE_MPEG,
			IExtension::EXTENSION_WAV	=> static::MIME_TYPE_WAV,
			IExtension::EXTENSION_WAVE	=> static::MIME_TYPE_WAVE,
		];
	}
347655
public function getTypeConverters()
    {
        if (null === $this->typeConverters) {
            $this->typeConverters = new TypeConverterCollection(
                array(
                    new DateTimeTypeConverter()
                )
            );
        }

        return $this->typeConverters;
    }
418935
public function getTypes()
    {
        if (!$this->columns && $this->length()) {
            foreach ($this->getColumns() as $col) {
                $this->types[$col] = 'string';
            }
        }

        return $this->types;
    }
622899
public function getServiceNamesByType($types, $only_active = false)
    {
        $names = [];
        $map = $this->getServiceNameTypeMap($only_active);
        if (is_string($types)) {
            $types = array_map('trim', explode(',', trim($types, ',')));
        }
        foreach ($map as $name => $type) {
            if (false !== array_search($type, $types)) {
                $names[] = $name;
            }
        }

        return $names;
    }
503229
public function getExtensions()
		{

			// Loop through extension map
			$exts = array();
			foreach (self::$extensionMap as $ext => $type) {
				if ($type == $this->type) {
					$exts[] = $ext;
				}
			}
			return $exts;

		}
1364982
public function getClassmap()
  {
    $classmap = $this->classmap;
    $classes  = [] ;

    if (!empty($classmap)) {
      foreach ($classmap as $class) {
        // Can't use end because of strict mode :(
        $name = current(array_slice(explode('\\', $class), -1, 1, true));

        $classes[$name] = $class;
      }
    }

    return $classes;
  }
369194
public function getColumnObjectsMapping()
    {
        $mapping = [];
        $foreignTable = $this->getForeignTable();
        for ($i = 0, $size = count($this->localColumns); $i < $size; $i++) {
            $mapping[] = [
                'local'   => $this->parentTable->getColumn($this->localColumns[$i]),
                'foreign' => $foreignTable->getColumn($this->foreignColumns[$i]),
                'value' => $this->localValues[$i],
            ];
        }

        return $mapping;
    }
358497
public function getTypes()
    {
        $types = array(
            'brand' => $this->translation->text('Brand'),
            'common' => $this->translation->text('Common'),
            'catalog' => $this->translation->text('Catalog')
        );

        $this->hook->attach('category.group.types', $types, $this);
        return $types;
    }
645667
public function typeDesc()
    {
        // Cast SimpleXMLObject to string
        $type = (string)$this->type;
        return array_key_exists($type, self::$types) ? self::$types[$type] : '';
    }