Getter/setter of what this Object currently prefers as output type

@param string|null $type
@return $this|string
349715
protected function prefers($type = null) {
		if ($type === null) {
			$prefers = 'object';
			if (!empty($this->_stub['iframe-player']) && $this->config['prefer'] === 'iframe') {
				$prefers = 'iframe';
			}
			return $prefers;
		}
		$this->config['prefer'] = $type;
		return $this;
	}
1305659
public function getNewType($type = null)
    {
        $className = $this->getTypeClass($type);
        /** @var GenericType $object */
        $object = new $className();
        $object->setManager($this);

        return $object;
    }
901989
public function setType(string $type):self
    {
        if (!isset($this->types[$type])) {
            Checkers::notice('Unknown response type [' . $type . ']');
        } else {
            $this->type = $type;
        }
        return $this;
    }
172175
public function setType($type)
    {
        if (!is_string($type)) {
            throw new \InvalidArgumentException('The attribute type on the class Entity has to be string (' . gettype($type) . ('object' === gettype($type) ? ' ' . get_class($type) : '') . ' given).');
        }

        $this->type = $type;

        return $this;
    }
542429
public function stringify( $quality = null, $type = null ) 
	{
		ob_start(); $this->stream( $quality, $type ); return ob_get_clean();
	}
538281
public function returnType($type = null)
  {
    if (null === $type)
    {
      return $this->responseConfig['returnType'];
    }

    $this->responseConfig['returnType'] = $type;

    return $this;
  }
62230
public function transport($type = null)
    {

        // Act as setter
        if (!is_null($type)) {
            $this->transport = $type;
        }

        return $this->transport;
    }
1057626
public function setInputType($type)
    {
        if (empty($type)) {
            $this->inputType = null;
            return $this;
        }

        if (!is_string($type)) {
            throw new InvalidArgumentException(
                'Property input type must be a string'
            );
        }

        $this->inputType = $type;

        return $this;
    }
1186831
public function setType($type = null)
    {
        if (is_array($type)) {
            $detected = 0;
            foreach ($type as $value) {
                if (is_int($value)) {
                    $detected += $value;
                } elseif (in_array($value, $this->constants)) {
                    $detected += array_search($value, $this->constants);
                }
            }

            $type = $detected;
        } elseif (is_string($type) && in_array($type, $this->constants)) {
            $type = array_search($type, $this->constants);
        }

        if (!is_int($type) || ($type < 0) || ($type > self::TYPE_ALL)) {
            throw new Exception\InvalidArgumentException(sprintf(
                'Unknown type value "%s" (%s)',
                $type,
                gettype($type)
            ));
        }

        $this->options['type'] = $type;
        return $this;
    }
1194794
public function setType($type)
    {
        if (!isset($this->types[$type])) {
            throw new InvalidArgumentException('type must be one of:' . implode(', ', array_keys($this->types)));
        }

        $this->type = $type;

        return $this;
    }
556125
public function of($type)
    {
        $type = strtolower($type);

        switch ($type) {

            case 'image':
            case 'jpg':
            case 'jpeg': {
                $this->type = 'jpg';
                break;
            }

            case 'audio':
            case 'mp3': {
                $this->type = 'mp3';
                break;
            }

            default: {
                if (in_array($type, ['png', 'pdf', 'doc', 'docx', 'odt'])) {
                    $this->type = $type;
                } else {
                    throw new InvalidArgumentException("Given type [$type] is incorrect.");
                }
            }
        }

        return $this;
    }
1264668
public function saveAs($output = null, $type = null) {
        $this->setRealType($type);
        if (!is_null($output)) {
            $output = (string)$output;
        }
        return call_user_func('image'.$this->realType, $this->image, $output);
    }
1194423
public function type($type = null) {
		if ($type === false) {
			unset($this->headers['Content-Type']);
			$this->_type = false;
			return;
		}
		$media = $this->_classes['media'];

		if (!$type && $this->_type) {
			return $this->_type;
		}
		$headers = $this->headers + ['Content-Type' => null];
		$type = $type ?: $headers['Content-Type'];

		if (!$type) {
			return;
		}
		$header = $type;

		if (!$data = $media::type($type)) {
			$this->headers('Content-Type', $type);
			return ($this->_type = $type);
		}
		if (is_string($data)) {
			$type = $data;
		} elseif (!empty($data['content'])) {
			$header = is_string($data['content']) ? $data['content'] : reset($data['content']);
		}
		$this->headers('Content-Type', $header);
		return ($this->_type = $type);
	}
325613
public function setType(Type $type)
    {
        if ($this->type !== $type) {
            $this->type = $type;
            $type->setItem($this);
        }

        return $this;
    }
279143
public function setPostType($type)
    {
        if (!in_array($type, [0, 1, 2, 3, 4, 5])) {
            $this->postType = self::POST_FORM_DATA;
        } else {
            $this->postType = $type;
        }
        return $this;
    }
775042
public function copy($type = null)
    {
        $builder = new Builder($this->type, $this->dogmatist, $this->parent, $this->strict);
        $this->copyData($builder);

        if ($type !== null) {
            $builder->setType($type);
        }

        return $builder;
    }
244265
public function setType($type)
    {
        if ($this->formHelper->getFieldType($type)) {
            $this->type = $type;
        }

        return $this;
    }