Checks if everything in required set is contained in available set.

@param string|array $requiredSet
@param string|array $availableSet
@return boolean
965543
protected function checkSets($requiredSet, $availableSet)
    {
        if (!is_array($requiredSet)) {
            $requiredSet = explode(' ', trim($requiredSet));
        }
        if (!is_array($availableSet)) {
            $availableSet = explode(' ', trim($availableSet));
        }
        return (count(array_diff($requiredSet, $availableSet)) == 0);
    }
1143927
public function having(\Parable\ORM\Query\ConditionSet $set)
    {
        $this->having[] = $set;
        return $this;
    }
792804
private function isRequired(Constraint $constraint): bool
    {
        foreach (self::REQUIRED_CONSTRAINTS as $requiredConstraint) {
            if ($constraint instanceof $requiredConstraint) {
                return true;
            }
        }

        return false;
    }
1248643
private function hasUserlandDependency(array $requires)
    {
        if (empty($requires)) {
            return false;
        }

        foreach ($requires as $name => $versionConstraint) {
            if ('php' === strtolower($name)) {
                continue;
            }

            if (0 === stripos($name, 'ext-')) {
                continue;
            }

            return true;
        }

        return false;
    }
327634
public function union ($set) {
        if (is_array ($set)) {
            $parameters = $set;
        } else {
            $parameters = func_get_args ();
        }
        foreach ($parameters as $n => $set) {
            if ($set instanceof ARedisSet) {
                $parameters[$n] = $set->name;
            }
        }
        array_unshift ($parameters , $this->name);
        return call_user_func_array (array(
            $this->getConnection ()->getSlave(),
            "sunion"
        ) , $parameters);
    }
778845
function isPropertyRequired(property, requiredArray) {
  var found = false;
  requiredArray = requiredArray || [];
  requiredArray.forEach(function(requiredProperty) {
      if (requiredProperty === property) {
        found = true;
      }
  });
  return found;
}
1040598
public function subset( \PhpSets\Set $set ) {
        $iterator = $set->entries();

        // iterate through $set and return false is an uncommon value is present
        while ( $iterator->valid() ) {
            if ( ! $this->has( $iterator->current() ) ) {
                return false;
            }
            $iterator->next();
        }

        $iterator->rewind();

        return true;
    }
462858
private function subset(array $set, array $subset): bool
    {
        return count(array_diff($subset, array_intersect($subset, $set))) === 0;
    }
159562
public function setRequired($required) {
		if(!empty($required))
			$this->validation[] = new Validation\Required;
		$this->_attributes["required"] = "";	
	}
188790
public function check(array $required, array $values)
	{
		foreach ($required as $key)
		{
			if (!array_key_exists($key, $values))
			{
				return false;
			}
		}

		return true;
	}
1053701
public function CheckRequirements($ApplicationName) {
      $AvailableApplications = $this->AvailableApplications();
      $RequiredApplications = ArrayValue('RequiredApplications', ArrayValue($ApplicationName, $AvailableApplications, array()), FALSE);
      $EnabledApplications = $this->EnabledApplications();
      CheckRequirements($ApplicationName, $RequiredApplications, $EnabledApplications, 'application');
   }
1018379
public function getSet($set)
    {
        if (isset($this->sets[$set])) {
            return $this->sets[$set];
        }
        return null;
    }
883735
function checkColumns($set = null)
    {
        if ($set !== null) {
            $this->check_columns = $set;
        }

        return $this->check_columns;
    }
918614
public function intersect( \PhpSets\Set $set ) {
        $iterator = $set->entries();
        $intersect = new \PhpSets\Set;

        while ( $iterator->valid() ) {
            if ( $this->has( $iterator->current() ) ) {
                $intersect->add( $iterator->current() );
            }
            $iterator->next();
        }
        $iterator->rewind();

        return $intersect;
    }
517079
protected function _isAllBankInformationSet($requiredFields, $bankInformation)
    {
        $isSet = true;
        foreach ($requiredFields as $fieldName) {
            if (!isset($bankInformation[$fieldName]) || !trim($bankInformation[$fieldName])) {
                $isSet = false;
                break;
            }
        }

        return $isSet;
    }
178632
public function setAvailableCards(array $AvailableCards)
    {
        if (count($unavailable = array_diff($AvailableCards, self::getAvailableCardsList())) != 0) {
            throw new InvalidArgumentException('Invalid card type "' . implode(',', $unavailable) . '"');
        }
        $this->AvailableCards = implode(';', $AvailableCards);

        return $this;
    }
748565
public function setRequired($required)
    {
        $this->required = (boolean) $required;
        if ($this->isRequired()) {
            $this->setAttribute('required');
            return $this;
        }

        if ($this->getAttributes()->containsKey('required')) {
                $this->getAttributes()->remove('required');
        }
        return $this;
    }