public function importValue($value) { if ($value instanceof HttpUrl) { return $this->import([$this->getName() => $value->toString()]); } elseif (is_scalar($value)) { return parent::importValue($value); } return parent::importValue(null); }
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; }
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; } }