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