Deactivates a Property.
@access		public
@param		string		$key			Key of  Property
@param		string		$value			Section of Property
@return		bool
434499
public function deactivateProperty( $key, $section = NULL)
	{
		if( $this->usesSections() )
		{
			if( !$this->hasProperty( $key, $section ) )
				throw new InvalidArgumentException( 'Key "'.$key.'" is not existing in section "'.$section.'"' );
			if( !$this->isActiveProperty( $key, $section ) )
				throw new LogicException( 'Key "'.$key.'" is already inactive' );
			$this->disabled[$section][] = $key;
			return is_int( $this->write() );
		}
		else
		{
			if( !$this->hasProperty( $key ) )
				throw new InvalidArgumentException( 'Key "'.$key.'" is not existing' );
			if( !$this->isActiveProperty( $key ) )
				throw new LogicException( 'Key "'.$key.'" is already inactive' );
			$this->disabled[] = $key;
			return is_int( $this->write() );
		}
	}
158780
public function offsetSet ($key, $value)
	{
		$this->changed_properties->push($key);

		return parent::offsetSet($key, $value);
	}
111239
public function hasPermission($key, $value)
    {
        $values = explode(',', $this->getPermission($key));

        return in_array($value, $values);
    }
1355718
public function set($key, $value)
    {
        $setting = SettingModel::create(
            [
                'key' => $key,
                'value' => $value,
            ]
        );

        return $setting ? $value : false;
    }
706723
public static function withSetting($key, $value = null)
    {
        return static::all()->filter(function ($row) use ($key, $value) {
            $setting = $row->settings($key);

            if (!is_null($value)) {
                return !is_null($setting) && $setting === $value;
            }

            return !is_null($setting);
        });
    }
121083
public function update(string $key, $value): bool
    {
        if ($this->hasNot($key)) {
            return false;
        }

        $this->set($key, $value);

        return true;
    }
111490
public function setting( $key, $value = false )
	{
		if( !$value )
		{
			return $this->_setting[$key];
		}
		else
		{
			$this->_setting[$key] = $value;
			return $value;
		}
	}
7218
public function remove($value): bool
    {
        if (!isset($this->hashMap[$value])) {
            return false;
        }

        unset($this->hashMap[$value]);

        return true;
    }
971700
public function decrement($key, $value = 1)
    {
        if ($this->exists($key)) {
            return self::$redis->decrBy($key, $value);
        } else {
            $this->set($key, -$value);

            return -$value;
        }
    }
92669
protected function _setOneProperty($key, $value = null, $expr = false)
        {
            if (!Arrays::is($key)) {
                $key = array($key => $value);
            }

            foreach ($key as $field => $value) {
                $this->_data[$field] = $value;
                $this->_dirty_fields[$field] = $value;

                if (false === $expr and isset($this->_expr_fields[$field])) {
                    unset($this->_expr_fields[$field]);
                } else if (true === $expr) {
                    $this->_expr_fields[$field] = true;
                }
            }

            return $this;
        }
888949
public function removeByIndex( $key, $value ){
		$this->table->focusIndex( $key, $value );
		$number	= 0;
		$rows	= $this->table->get( FALSE );
		if( count( $rows ) ){
			$number = $this->table->delete();
			foreach( $rows as $row ){
				switch( $this->fetchMode ){
					case \PDO::FETCH_CLASS:
					case \PDO::FETCH_OBJ:
						$id	= $row->{$this->primaryKey};
						break;
					default:
						$id	= $row[$this->primaryKey];
				}
				$this->cache->remove( $this->cacheKey.$id );
			}
			$result	= TRUE;
		}
		$this->table->defocus();
		return $number;
	}
22821
public function remove($key)
    {
        if (array_key_exists($key, $this->settings)) {
            unset($this->settings[$key]);
            return true;
        }
        return false;
    }
1062600
public function delete($value)
    {
        foreach (array_keys($this->collection, $value, true) as $key) {
            unset($this->collection[$key]);
        }

        return $this;
    }
384777
public function keyWhere($property, $value)
    {
        foreach ($this->objects as $key => $obj) {
            if ($obj->{$property} === $value) {
                $keys[] = $key;
            }
        }
        if (count($keys)) {
            return $keys;
        }
        return false;
    }
1123571
public static function flash($key, $value = null)
    {
        if ($value === null) {
            $result = static::get($key);
            static::remove($key);
            return $result;
        } else {
            static::set($key, $value);
        }
    }
198522
public function setByKey($key, $value)
    {
        $storage = $this->getStorage();
        if ($value !== '' && $value !== null) {
            $storage[$key] = $value;
        } else {
            unset($storage[$key]);
        }
        $this->setStorage($storage);
    }
649926
public function session($key = '', $value = '')
    {
        $this->sessionStart();

        if (is_null($key)) {
            if (empty($_SESSION)) {
                return null;
            }

            unset($_SESSION);
        } elseif ('' === $key) {
            // Get All Session
            return $_SESSION;
        }

        if ('' === $value) {
            return isset($_SESSION[$key]) ? $_SESSION[$key] : null;
        } else {
            if (is_null($value)) {
                unset($_SESSION[$key]);
            } else {
                $_SESSION[$key] = $value;
            }
        }

        return null;
    }