예제 #1
0
 public function import($scope)
 {
     if (!($result = parent::import($scope))) {
         return $result;
     }
     if (!ClassUtils::isClassName($scope[$this->name]) || !$this->classExists($scope[$this->name]) || $this->ofClassName && !ClassUtils::isInstanceOf($scope[$this->name], $this->ofClassName)) {
         $this->value = null;
         return false;
     }
     return true;
 }
예제 #2
0
 public function import($scope)
 {
     if (!($result = parent::import($scope))) {
         return $result;
     }
     if ($this->value = $this->isSplitByRegexp() ? preg_split($this->separator, $this->value, -1, PREG_SPLIT_NO_EMPTY) : explode($this->separator, $this->value)) {
         return true;
     } else {
         return false;
     }
 }
예제 #3
0
 public function import($scope)
 {
     if (!($result = parent::import($scope))) {
         return $result;
     }
     try {
         $this->value = HttpUrl::create()->parse($this->value)->setCheckPrivilegedPorts($this->checkPrivilegedPorts);
     } catch (WrongArgumentException $e) {
         $this->value = null;
         return false;
     }
     if (!$this->value->isValid()) {
         $this->value = null;
         return false;
     }
     $this->value->normalize();
     return true;
 }