Returns the type instance for the provided key
@param string|\Altamira\Series $series
@return multitype:|NULL
490447
public function getType( $series = null )
    {
        $series = $series ?: 'default';
        $seriesTitle = $this->getSeriesTitle( $series );
        
        return isset( $this->types[$seriesTitle] ) ? $this->types[$seriesTitle] : null;
    }
132690
public static function getType($type)
    {
        if (!isset(self::$typesMap[$type])) {
            throw new \InvalidArgumentException(sprintf('Invalid type specified "%s".', $type));
        }
        if (!isset(self::$typeObjects[$type])) {
            $className                = self::$typesMap[$type];
            self::$typeObjects[$type] = new $className;
        }

        return self::$typeObjects[$type];
    }
1352196
public function initialise($Serie)
    {
        $ID = 0;
        if (isset($this->Data["Series"])) {
            $ID = count($this->Data["Series"]);
        }

        $this->Data["Series"][$Serie]["Description"] = $Serie;
        $this->Data["Series"][$Serie]["isDrawable"] = true;
        $this->Data["Series"][$Serie]["Picture"] = null;
        $this->Data["Series"][$Serie]["Max"] = null;
        $this->Data["Series"][$Serie]["Min"] = null;
        $this->Data["Series"][$Serie]["Axis"] = 0;
        $this->Data["Series"][$Serie]["Ticks"] = 0;
        $this->Data["Series"][$Serie]["Weight"] = 0;
        $this->Data["Series"][$Serie]["Shape"] = SERIE_SHAPE_FILLEDCIRCLE;

        if (isset($this->Palette[$ID])) {
            $this->Data["Series"][$Serie]["Color"] = $this->Palette[$ID];
        } else {
            $this->Data["Series"][$Serie]["Color"]["R"] = rand(0, 255);
            $this->Data["Series"][$Serie]["Color"]["G"] = rand(0, 255);
            $this->Data["Series"][$Serie]["Color"]["B"] = rand(0, 255);
            $this->Data["Series"][$Serie]["Color"]["Alpha"] = 100;
        }
        $this->Data["Series"][$Serie]["Data"] = [];
    }
943487
public static function getType($extension) {
        foreach (self::$map as $mime => $exts) {
            if (in_array(strtolower($extension), $exts)) {
                return $mime;
            }
        }
        return null;
    }
216947
function(seriesKeys) {
        var fieldValues = _.values(seriesKeys),
            matchingSeriesDef = _.find(this._attributes.series, function(seriesDef) {
                return _.contains(fieldValues, seriesDef.name);
            });
        if (!matchingSeriesDef) {
            return _.find(this._attributes.series, function(seriesDef) {
                return !seriesDef.name;
            });
        }
        return matchingSeriesDef;
    }
755631
public static function getType($type)
    {
        if (!isset(static::$mappedTypeInstances[$type])) {
            if (!static::hasType($type)) {
                throw TypeException::typeDoesNotExist($type);
            }

            static::$mappedTypeInstances[$type] = new static::$mappedTypeClasses[$type]();
        }

        return static::$mappedTypeInstances[$type];
    }
100319
public function getType($key) {
        $types = $this->getSupportedTypes();

        if (isset($types[$key])) {
            return new $types[$key]($this);
        }

        throw new UnsupportedTypeException(sprintf('Unsupported data type %s', $key));
    }
996465
public static function getInstance($type)
    {
        self::checkType($type);

        if (!isset(self::$instances[$type])) {
            self::$instances[$type] = new \Tx_Oelib_Session($type);
        }

        return self::$instances[$type];
    }
91957
protected function columnTypeToHintType($type) {
		if (static::$typeMap === null) {
			static::$typeMap = (array)Configure::read('IdeHelper.typeMap') + static::$typeMapDefaults;
		}

		if (isset(static::$typeMap[$type])) {
			return static::$typeMap[$type];
		}

		return null;
	}
1135153
public function type($name)
    {
        if (!$this->has($name)) {
            return;
        }
        $column = $this->column($name);
        return isset($column['type']) ? $column['type'] : null;
    }
1112694
public static function get($type)
    {
        $instance = null;

        switch ($type) {

            case 'IM/Send':
                $instance = new SendService();
                break;

            case 'IM/Status':
                $instance = new StatusService();
                break;

            case 'TFA/Request':
                $instance = new RequestService();
                break;

            case 'TFA/Validate':
                $instance = new ValidateService();
                break;

            default:
                throw new \Exception("Error - Unknow service", 1);

        }
        return $instance;
    }
956989
public function resolve($alias): ?Type
    {
        if (null === $alias) {
            return null;
        }

        if (!isset($this->cache[$alias])) {
            $type = $this->string2Type($alias);
            $this->cache[$alias] = $type;
        }

        return $this->cache[$alias];
    }
1122222
private static function getClass($type)
    {
        if (!\array_key_exists($type, self::$types)) {
            throw new \RuntimeException('invalid type');
        }

        return self::$types[$type];
    }
1334127
private function determine( $type, $key_type = false ) {
		if ( ! $key_type && $this->non_scalar_type_exists( $type ) ) {
			return $type;
		}

		if ( $scalar_type = $this->determine_scalar( $type ) ) {
			if ( $key_type && (in_array( $scalar_type, array( 'double', 'boolean' ) )) ) {
				throw new InvalidArgumentException( 'This type is not supported as a key.' );
			}

			return $scalar_type;
		}

		throw new InvalidArgumentException( 'This type does not exist.' );
	}
664522
public function getType(string $type): Type
    {
        if (isset($this->types[$type])) {
            return $this->types[$type];
        }

        $instance = $this->createType($type);
        $this->addType($instance);
        $this->types[$type] = $instance;

        return $instance;
    }
1082864
protected function renderSeries(SeriesInterface $series)
    {
        if ($series instanceof AreaSeriesInterface) {
            $type = 'area';
        } elseif ($series instanceof AreaSplineSeriesInterface) {
            $type = 'areaspline';
        } elseif ($series instanceof BarSeriesInterface) {
            $type = 'bar';
        } elseif ($series instanceof ColumnSeriesInterface) {
            $type = 'column';
        } elseif ($series instanceof LineSeriesInterface) {
            $type = 'line';
        } elseif ($series instanceof PieSeriesInterface) {
            $type = 'pie';
        } elseif ($series instanceof ScatterSeriesInterface) {
            $type = 'scatter';
        } elseif ($series instanceof SplineSeriesInterface) {
            $type = 'spline';
        } else {
            throw new UnexpectedValueException();
        }

        $options['type'] = $type;

        if (null !== $series->getName()) {
            $options['name'] = $series->getName();
        }
        if (null !== $series->getColor()) {
            $options['color'] = $series->getColor();
        }
        if (null !== $series->getXAxis()) {
            $options['xAxis'] = $series->getXAxis();
        }
        if (null !== $series->getYAxis()) {
            $options['yAxis'] = $series->getYAxis();
        }

        foreach ($series->getDataPoints() as $dataPoint) {
            $options['data'][] = $this->renderDataPoint($dataPoint);
        }
        if (null !== $series->getLabelsFormatter()) {
            $options['dataLabels']['formatter'] = $series->getLabelsFormatter();
        }

        $options['marker'] = $this->renderMarker($series->getMarker());
        $options['enableMouseTracking'] = $series->isEnableMouseTracking();

        if (null !== $series->getCursor()) {
            $options['cursor'] = $series->getCursor();
        }

        if ($series instanceof SequentialSeriesInterface) {
            $options['pointStart'] = $series->getPointStart();
        }
        if ($series instanceof StackableSeriesInterface) {
            if (true === $series->isStacking()) {
                if (true === $series->isPercentageStacking()) {
                    $options['stacking'] = 'percent';
                } else {
                    $options['stacking'] = 'normal';
                }
            }
        }

        $events = array();

        if (null !== $series->getCheckboxClickEvent()) {
            $events['checkboxClick'] = $series->getCheckboxClickEvent();
        }
        if (null !== $series->getClickEvent()) {
            $events['click'] = $series->getClickEvent();
        }
        if (null !== $series->getHideEvent()) {
            $events['hide'] = $series->getHideEvent();
        }
        if (null !== $series->getLegendItemClickEvent()) {
            $events['legendItemClick'] = $series->getLegendItemClickEvent();
        }
        if (null !== $series->getMouseOutEvent()) {
            $events['mouseOut'] = $series->getMouseOutEvent();
        }
        if (null !== $series->getMouseOverEvent()) {
            $events['mouseOver'] = $series->getMouseOverEvent();
        }
        if (null !== $series->getShowEvent()) {
            $events['show'] = $series->getShowEvent();
        }

        if (count($events) > 0) {
            $options['events'] = $events;
        }

        if (false === $series->getAnimation()->isEnabled()) {
            $options['animation'] = false;
        } else {
            $animation = array();

            if (null !== $series->getAnimation()->getDuration()) {
                $animation['duration'] = $series->getAnimation()->getDuration();
            }
            if (null !== $series->getAnimation()->getEasing()) {
                $animation['easing'] = $series->getAnimation()->getEasing();
            }

            if (count($animation) > 0) {
                $options['animation'] = $animation;
            }
        }

        if ($series instanceof PieSeriesInterface) {
            if (null !== $series->getXPosition() && null !== $series->getYPosition()) {
                $xPosition = true === $series->isXPositionAPercentage() ?
                    $series->getXPosition() . '%' :
                    $series->getXPosition();
                $yPosition = true === $series->isYPositionAPercentage() ?
                    $series->getYPosition() . '%' :
                    $series->getYPosition();
                $options['center'] = array($xPosition, $yPosition);
            }

            if (null !== $series->getSize()) {
                $options['size'] = true === $series->isSizeAPercentage() ?
                    $series->getSize() . '%' :
                    $series->getSize();
            }

            $options['dataLabels']['distance'] = $series->getLabelsDistance();
        }

        $hoverState = array(
            'enabled' => $series->getHoverState()->isEnabled(),
            'marker' => $this->renderMarker($series->getHoverState()->getMarker()),
        );

        if (null !== $series->getHoverState()->getLineWidth()) {
            $hoverState['lineWidth'] = $series->getHoverState()->getLineWidth();
        }
        if (
            true === $series->getHoverState() instanceof SolidHoverStateInterface &&
            null !== $series->getHoverState()->getBrightness()
        ) {
            $hoverState['brightness'] = $series->getHoverState()->getBrightness();
        }

        $options['states']['hover'] = $hoverState;

        return $options;
    }
1006355
public function getClosureById(int $seriesId): Closure
    {
        return function ($language) use ($seriesId) {
            $json = $this->parent->performAPICallWithJsonResponse(
                'get',
                '/series/'.$seriesId,
                [
                    'headers' => ['Accept-Language' => $language]
                ]
            );

            return DataParser::parseData($json, Series::class);
        };
    }