public function setType( $type, $options = array(), $series = 'default' )
    {
        $options = $options ?: array(); // i shouldn't have to do this
        
        $className =  $this->typeNamespace . ucwords( $type );
     
        if( class_exists( $className ) ) {
            $type = new $className( $this );
        } else {
            throw new \Exception( "Type {$type} does not exist" );
        }
        
        $type->setOptions( $options );
        
        $series = $this->getSeriesTitle( $series );
        $this->types[$series] = $type;
        if ( isset( $this->options['seriesStorage'][$series] ) ) {
            $this->options['seriesStorage'][$series] = array_merge_recursive( $this->options['seriesStorage'][$series], $type->getSeriesOptions() );
            if ( $renderer = $type->getRenderer() ) {
                $this->options['seriesStorage'][$series]['renderer'] = $renderer;
            }
        }
        $this->options = array_merge_recursive( $this->options, $type->getOptions() );
        return $this;
    }
public function setType( $type, $options = array(), $series = 'default' )
    {
        $options = $options ?: array(); // i shouldn't have to do this
        
        $className =  $this->typeNamespace . ucwords( $type );
     
        if( class_exists( $className ) ) {
            $type = new $className( $this );
        } else {
            throw new \Exception( "Type {$type} does not exist" );
        }
        
        $type->setOptions( $options );
        
        $series = $this->getSeriesTitle( $series );
        $this->types[$series] = $type;
        if ( isset( $this->options['seriesStorage'][$series] ) ) {
            $this->options['seriesStorage'][$series] = array_merge_recursive( $this->options['seriesStorage'][$series], $type->getSeriesOptions() );
            if ( $renderer = $type->getRenderer() ) {
                $this->options['seriesStorage'][$series]['renderer'] = $renderer;
            }
        }
        $this->options = array_merge_recursive( $this->options, $type->getOptions() );
        return $this;
    }
public function setType ( $ type , $ options = array ( ) , $ series = 'default' ) { $ options = $ options ? : array ( ) ; // i shouldn't have to do this $ className = $ this -> typeNamespace . ucwords ( $ type ) ; if ( class_exists ( $ className ) ) { $ type = new $ className ( $ this ) ; } else { throw new \ Exception ( "Type {$type} does not exist" ) ; } $ type -> setOptions ( $ options ) ; $ series = $ this -> getSeriesTitle ( $ series ) ; $ this -> types [ $ series ] = $ type ; if ( isset ( $ this -> options [ 'seriesStorage' ] [ $ series ] ) ) { $ this -> options [ 'seriesStorage' ] [ $ series ] = array_merge_recursive ( $ this -> options [ 'seriesStorage' ] [ $ series ] , $ type -> getSeriesOptions ( ) ) ; if ( $ renderer = $ type -> getRenderer ( ) ) { $ this -> options [ 'seriesStorage' ] [ $ series ] [ 'renderer' ] = $ renderer ; } } $ this -> options = array_merge_recursive ( $ this -> options , $ type -> getOptions ( ) ) ; return $ this ; }
Returns an type that has not yet been registered.
@param \Altamira\Type\TypeAbstract $type
@param array $options
@param string|\Altamira\Series $series
Returns an type that has not yet been registered .