Example #1
0
 public function importSingle($scope)
 {
     if (!BasePrimitive::import($scope) || is_array($scope[$this->name])) {
         return null;
     }
     if (isset($scope[$this->name]) && is_string($scope[$this->name])) {
         $array = explode('-', $scope[$this->name], 2);
         $range = BaseRange::lazyCreate(ArrayUtils::getArrayVar($array, 0), ArrayUtils::getArrayVar($array, 1));
         if ($range && $this->checkLimits($range)) {
             $this->value = $range;
             return true;
         }
     }
     return false;
 }