123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- <?php
- /**
- * Created by PhpStorm.
- * User: robin
- * Date: 5/29/16
- * Time: 7:48 PM
- */
-
- namespace Luticate\Utils\Dbo;
-
- class LuParameterDbo extends LuDbo
- {
- /**
- * @var $_summary string
- */
- private $_summary = "";
-
- /**
- * @return string
- */
- public function getSummary()
- {
- return $this->_summary;
- }
-
- /**
- * @param string $summary
- */
- public function setSummary($summary)
- {
- $this->_summary = $summary;
- }
-
- /**
- * @var $_type string
- */
- private $_type = "";
-
- /**
- * @var $_name string
- */
- private $_name = "";
-
- /**
- * @return string
- */
- public function getType()
- {
- return $this->_type;
- }
-
- /**
- * @param string $type
- */
- public function setType($type)
- {
- $this->_type = $type;
- }
-
- /**
- * @return string
- */
- public function getName()
- {
- return $this->_name;
- }
-
- /**
- * @param string $name
- */
- public function setName($name)
- {
- $this->_name = $name;
- }
-
- /**
- * @return LuParameterConstraintDbo[]
- */
- public function getConstraints()
- {
- return $this->_constraints;
- }
-
- /**
- * @param LuParameterConstraintDbo[] $constraints
- */
- public function setConstraints($constraints)
- {
- $this->_constraints = $constraints;
- }
-
- public function addConstraint($constraint)
- {
- $this->_constraints[] = $constraint;
- }
-
- /**
- * @var $_constraints LuParameterConstraintDbo[]
- */
- private $_constraints = [];
-
- function jsonSerialize()
- {
- $constraints = [];
- foreach ($this->_constraints as $constraint) {
- $constraints[] = $constraint->jsonSerialize();
- }
- return [
- "Name" => $this->_name,
- "Type" => $this->_type,
- "Summary" => $this->_summary,
- "Constraints" => $constraints
- ];
- }
- }
|