Checks to see if we have a primary value/s set

@param array $primary List of primary columns

@return bool
348448
protected function isPrimarySet(array $primary)
    {
        foreach ($primary as $column) {
            if (is_null($this[$column])) {
                return false;
            }
        }

        return true;
    }
109195
public function findByPK(array $primary_key)
    {
        $where = $this
            ->checkPrimaryKey($primary_key)
            ->getWhereFrom($primary_key)
            ;

        $iterator = $this->findWhere($where);

        return $iterator->isEmpty() ? null : $iterator->current();
    }
142753
public function isDisplayed(array $row)
    {
        if ($this->hasShowOnValues() === false) {
            return true;
        }

        $isDisplayed = false;
        foreach ($this->getShowOnValues() as $rule) {
            $value = '';
            if (isset($row[$rule['column']->getUniqueId()])) {
                $value = $row[$rule['column']->getUniqueId()];
            }

            if ($rule['value'] instanceof AbstractColumn) {
                if (isset($row[$rule['value']->getUniqueId()])) {
                    $ruleValue = $row[$rule['value']->getUniqueId()];
                } else {
                    $ruleValue = '';
                }
            } else {
                $ruleValue = $rule['value'];
            }

            $isDisplayedMatch = Filter::isApply($value, $ruleValue, $rule['comparison']);
            if ($this->getShowOnValueOperator() == 'OR' && true === $isDisplayedMatch) {
                // For OR one match is enough
                return true;
            } elseif ($this->getShowOnValueOperator() == 'AND' && false === $isDisplayedMatch) {
                return false;
            } else {
                $isDisplayed = $isDisplayedMatch;
            }
        }

        return $isDisplayed;
    }
611638
protected function isPrimaryKey(Table $table, Column $column)
	{
		if ($table->hasPrimaryKey()) {
			$primaryKeys = $table->getPrimaryKey()->getColumns();

			return in_array($column->getName(), $primaryKeys);
		}

		return false;
	}
919826
public function offsetExists($offset)
    {
        return isset($this->base['value'][$offset]) && is_array($this->base['value'][$offset]);
    }
675409
final public static function hasValue (...$values) : bool
	{
		foreach ($values as $value):
			if (is_array($value)):
				if (!(isset($value) AND (!empty($value)))):
					return FALSE; break;
				endif;
			else:
				$trimmedValue = trim($value);
				if (!(isset($trimmedValue) AND ($trimmedValue !== ""))):
					return FALSE; break;
				endif;
			endif;
		endforeach;
		return TRUE;
	}
1308580
public function isFirst($key)
	{
		if ($this->rows && $this->count())
		{
			return $key == array_slice($this->rows, 0, 1)[0]->getPkValue();
		}

		return false;
	}
130471
public function setPrimaryKey(PrimaryKey $primaryKey)
    {
        foreach ($primaryKey->getColumnNames() as $columnName) {
            $this->getColumn($columnName)->setNotNull(true);
        }

        $this->primaryKey = $primaryKey;
    }
295630
public function has($primaryKey, $column = null)
    {
        if (null === $column) {
            $column = $this->getPrimaryKey();
        }

        return (boolean)$this->app['db']->fetchColumn(
            'SELECT COUNT(:column) FROM ' . $this->getTable() . ' WHERE '.$this->getPrimaryKey().' = :pk',
            [
                'column' => $column,
                'pk' => $primaryKey
            ]
        );
    }
165690
public function has_id_increment($table): bool
  {
    return ($model = $this->modelize($table)) &&
      isset($model['keys']['PRIMARY']) &&
      (\count($model['keys']['PRIMARY']['columns']) === 1) &&
      ($model['fields'][$model['keys']['PRIMARY']['columns'][0]]['extra'] === 'auto_increment');
  }
283035
public function has($value)
    {
        if (!is_string($value) && !is_array($value)) {
            throw new \InvalidArgumentException('The ValueSet\'s "has" method requires the argument to be of type string or array');
        }

        if (is_string($value)) {
            return $this->__isset($value);
        } elseif (is_array($value)) {
            foreach ($value as $name) {
                if (!$this->__isset($value)) {
                    return false;
                }
            }

            return true;
        }
    }
354762
public function hasColumn($col)
    {
        if (!$this->getModel()->getOwnColumns()) return true;
        if (in_array($col, $this->getModel()->getOwnColumns())) return true;
        if (in_array($col, $this->getModel()->getExprColumns())) return true;
        foreach ($this->_getSiblingRows() as $r) {
            if ($r->hasColumn($col)) return true;
        }
        return false;
    }
476305
public function findOne($primary)
    {
        $item = $this->getRegistry()->get($primary);
        if (!$item) {
            $all = $this->getRegistry()->get("all");
            if ($all) {
                $item = $all[$primary];
            }
            if (!$item) {
                $params['where'][] = ["`{$this->getTable()}`.`{$this->getPrimaryKey()}` = ?", $primary];
                $item = $this->findOneByParams($params);
                if ($item) {
                    $this->getRegistry()->set($primary, $item);
                }

                return $item;
            }
        }

        return $item;
    }
1197424
public function isExists($condition) {
		/** @var Query $query */
		$query = $this->prepareQuery();
		if(is_array($condition)) {
			$query->whereFromCondition($condition);
		} else {
			$query->where($this->primaryKey, $condition);
		}
		try {
			$this->one($query);
			return true;
		} catch(NotFoundHttpException $e) {
			return false;
		}
	}
997298
public function contains($key, $value = null): bool
    {
        if (func_num_args() == 2) {
            return $this->contains(function ($k, $item) use ($key, $value) {
                return ArrayHelper::getValue($item, $key) == $value;
            });
        }

        if ($this->useAsCallable($key)) {
            return !is_null($this->first($key));
        }

        return in_array($key, $this->items);
    }
421137
public function has($offset = null)
    {
        if ($offset === null) {
            return $this->count() > 0;
        }

        return array_key_exists($offset, $this->storage);
    }
1149098
public function isColumnsToRepeatAtLeftSet() {
		if (is_array($this->_columnsToRepeatAtLeft)) {
			if ($this->_columnsToRepeatAtLeft[0] != '' && $this->_columnsToRepeatAtLeft[1] != '') {
				return true;
			}
		}

		return false;
	}