for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php declare(strict_types = 1);
/*
* This file is part of the KleijnWeb\ApiDescriptions package.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace KleijnWeb\ApiDescriptions\Description;
use KleijnWeb\ApiDescriptions\Description\Visitor\VisiteeMixin;
/**
* @author John Kleijn <[email protected]>
abstract class Parameter implements Element
{
use VisiteeMixin;
const IN_BODY = 'body';
const IN_PATH = 'path';
const IN_QUERY = 'query';
const IN_HEADER = 'header';
* @var string
protected $name;
protected $collectionFormat;
* @var Schema
protected $schema;
* @var bool
protected $required = false;
protected $in;
* @var string|null
protected $enum;
protected $pattern;
* @return string|null
public function getEnum()
return $this->enum;
}
public function getPattern()
return $this->pattern;
public function getCollectionFormat()
return $this->collectionFormat;
* @return string
public function getIn(): string
return $this->in;
* @return bool
public function isRequired(): bool
return $this->required;
* @return Schema
public function getSchema(): Schema
return $this->schema;
public function getName(): string
return $this->name;
* @param string $location
public function isIn(string $location): bool
return $this->in === $location;