芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/public_html/invoicer.pulsehost.co.uk/vendor/silber/bouncer/ValueConstraint.php
column = $column; $this->operator = $operator; $this->value = $value; } /** * Determine whether the given entity/authority passed this constraint. * * @return bool */ public function check(Model $entity, ?Model $authority = null) { return $this->compare($entity->{$this->column}, $this->value); } /** * Create a new instance from the raw data. * * @return static */ public static function fromData(array $data) { $constraint = new static( $data['column'], $data['operator'], $data['value'] ); return $constraint->logicalOperator($data['logicalOperator']); } /** * Get the JSON-able data of this object. * * @return array */ public function data() { return [ 'class' => static::class, 'params' => [ 'column' => $this->column, 'operator' => $this->operator, 'value' => $this->value, 'logicalOperator' => $this->logicalOperator, ], ]; } }