Remove a specific site from all users
Return True or false

@param string $propertyName Property name
@param string $value Property value with a site
@return bool
@throws \ByJG\MicroOrm\Exception\InvalidArgumentException
6917
public function removeAllProperties($propertyName, $value = null)
    {
        $updateable = Updatable::getInstance()
            ->table($this->getUserPropertiesDefinition()->table())
            ->where("{$this->getUserPropertiesDefinition()->getName()} = :name", ["name" => $propertyName]);

        if (!empty($value)) {
            $updateable->where("{$this->getUserPropertiesDefinition()->getValue()} = :value", ["value" => $value]);
        }

        $this->propertiesRepository->deleteByQuery($updateable);

        return true;
    }
1317778
public function getterAvailable(string $propertyName): bool
    {
        $this->existsOrFail($propertyName);
        return $this->isExistingPropertyGetterAvailable($propertyName);
    }
1007949
public function set($name, $value)
    {
        if (property_exists($this, $name)) {
            $this->$name = $value;

            return true;
        }

        return null;
    }
905959
public function remove($value)
    {
        if (is_array($value)) {
            return $this->handleArray('remove', $value);
        }
        $key = array_search($value, $this->values);
        if (false === $key) {
            return false;
        }
        $this->offsetUnset($key);
        return true;
    }
362066
public function cofigureSession (string $name, $value) : bool
    {
        if (!property_exists($this, $name)) return FALSE;
        $allowedProperties = ['expire', 'path', 'domain', 'secure', 'httponly'];
        if (!in_array(strtolower($name), $allowedProperties)) return FALSE;
        $this->$name = $value;                
        return TRUE;
    }
704304
public function filter($property_name, $value, $include_children = false)
    {
        // Result collection.
        $filter_result = new Collection();

        $this->item_collection->filter(function ($item) use ($property_name, $value, $include_children, &$filter_result) {
            if (!isset($item->$property_name)) {
                return false;
            }

            if ($item->$property_name == $value) {
                $filter_result->push($item);

                // Check if item has any children
                if ($include_children && $item->hasChildren()) {
                    $filter_result = $filter_result->merge($this->filter('parent_id', $item->id, $include_children));
                }
            }

            return false;
        });

        return $filter_result;
    }
790585
public function setPage($value)
    {
        if ($value === null || $value === '') {
            $this->_page = null;
        } elseif (TypeCast::canCastToString($value)) {
            $this->_page = (string)$value;
        } else {
            throw new InvalidPropertyValueTypeException(
                'Invalid status value in PaymentsRequest', 0, 'PaymentsRequest.page', $value
            );
        }
    }
794355
public static function invalidAddress(string $value, string $valueName) : InvalidArgumentException
    {
        return new self(sprintf('"%s" is not valid "%s"', $value, $valueName));
    }
216927
private function updateInitializedPropertyValue($propertyName, $value)
    {
        if (empty($this->_collectionsItemNames['byProperty'][$propertyName])) {
            $this->updatePropertyAssociation($propertyName, array("oldValue" => null, "newValue" => $value));
        } else {
            foreach ($value as $newValue) {
                $this->updatePropertyAssociation($propertyName, array("oldValue" => null, "newValue" => $newValue));
            }
        }
    }
1115323
public function deleteUser($username)
    {
        /** @var UserInterface|EloquentUser $user */
        if ( ! ($user = $this->sentinel->findByCredentials(['email' => $username]))) {
            return false;
        }

        // The super admin may not be deleted.
        if ($user->isAdmin()) {
            return false;
        }

        return (bool) $user->delete();
    }
211673
public void remove(final String propertyName) {
        Preconditions.checkNotNull(propertyName);
        if (properties.containsKey(propertyName)) {
            properties.remove(propertyName);
        } else if (references.containsKey(propertyName)) {
            references.remove(propertyName);
        }
    }
231297
private function isPropertyAccessible($propertyName)
    {
        $result = false;
        $className = get_class($this);
        $reflectionService = ReflectionService::get();

        if ($reflectionService->isClassPropertyAccessible($className, $propertyName)) {
            $property = $reflectionService->getClassAccessibleProperty($className, $propertyName);
            $result = false === $property->isTaggedWith('disableMagicMethods');
        }

        return $result;
    }
142350
public function hasPropertyChanged($propertyName)
    {
        $propertyValue = null;
        $inSnapshot = isset($this->changeSnapshotData[$propertyName]);
        $inModelData = isset($this->modelData[$propertyName]);
        if (!$inModelData && $inSnapshot) {
            // Key removed.
            return true;
        } elseif ($inModelData) {
            // Determine the current value (if it's safe to do so)
            $propertyValue = $this->modelData[$propertyName];
        }

        if (!$inSnapshot) {
            if ($propertyValue === null) {
                // Value is NULL so isset will have failed. Setting a previously unset key to NULL is treated as no change
                return false;
            }

            // Key added
            return true;
        }

        if ((is_string($propertyValue) && is_string($this->changeSnapshotData[$propertyName])) && $this->changeSnapshotData[$propertyName] !== $propertyValue) {
            return true;
        }

        if ($this->changeSnapshotData[$propertyName] != $propertyValue) {
            // Key changed
            return true;
        }

        return false;
    }
1011805
protected function validateValue($property, $value)
    {
        $this->isPropertyValid($property);

        $regEx = '/^' . self::CONFIRMATION_PROPERTIES[$property] . '$/';

        if (preg_match($regEx, $value) != 1) {
            throw new InvalidArgumentException("The value " . $value . " for the property " . $property . ", is invalid");
        }

        return $value;
    }
1342609
public function isVirtual(string $propertyName): bool
    {
        $this->existsOrFail($propertyName);
        return $this->isExistingPropertyVirtual($propertyName);
    }
781178
public function setProperty($name, $value)
    {
        if (strstr($name, '.')) {
            $this->setPropertyByPath($name, $value);

            return true;
        }

        if ($this->isArray()) {
            $this->object[$name] = $value;
        } else {
            $this->object->$name = $value;
        }

        return true;
    }
1195855
public function remove($property, $value)
	{
		if ('_' == substr($property, 0, 1))
		{
			$this->setError("Can't access private properties");
			return false;
		}

		if (property_exists(__CLASS__, $property) || property_exists(__CLASS__, '_auxs_' . $property))
		{
			$this->setError("Can't remove value(s) from non-array property.");
			return false;
		}

		if (!property_exists(__CLASS__, '_auxv_' . $property))
		{
			$this->setError("Unknown property: $property");
			return false;
		}

		if (!isset($value))
		{
			return true;
		}

		if (!is_array($value))
		{
			$value = array($value);
		}

		$property = '_auxv_' . $property;

		foreach ($value as $v)
		{
			$v = strval($v);

			if (in_array($v, $this->$property))
			{
				$this->$property = array_diff($this->$property, array($v));
			}
		}

		return true;
	}