# media-cloud-sync/1.4.2/includes/sdk/s3/Aws/EndpointV2/Rule/AbstractRule.php

Media Cloud Sync, version 1.4.2. 50 lines.

- Page: https://pluginprobe.com/plugins/media-cloud-sync/1.4.2/code/includes/sdk/s3/Aws/EndpointV2/Rule/AbstractRule.php
- Raw: https://pluginprobe.com/plugins/media-cloud-sync/1.4.2/raw/includes/sdk/s3/Aws/EndpointV2/Rule/AbstractRule.php
- Modified: 2025-08-17T07:06:28+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/media-cloud-sync/1.4.2/code/includes/sdk/s3/Aws/EndpointV2/Rule/AbstractRule.php#L10-L20`.

```php
<?php

namespace Dudlewebs\WPMCS\s3\Aws\EndpointV2\Rule;

use Dudlewebs\WPMCS\s3\Aws\EndpointV2\Ruleset\RulesetStandardLibrary;
/**
 *  A rule within a rule set. All rules contain a conditions property,
 * which can be empty, and documentation about the rule.
 */
abstract class AbstractRule
{
    private $conditions;
    private $documentation;
    public function __construct(array $definition)
    {
        $this->conditions = $definition['conditions'];
        $this->documentation = isset($definition['documentation']) ? $definition['documentation'] : null;
    }
    /**
     * @return array
     */
    public function getConditions()
    {
        return $this->conditions;
    }
    /**
     * @return mixed
     */
    public function getDocumentation()
    {
        return $this->documentation;
    }
    /**
     * Determines if all conditions for a given rule are met.
     *
     * @return boolean
     */
    protected function evaluateConditions(array &$inputParameters, RulesetStandardLibrary $standardLibrary)
    {
        foreach ($this->getConditions() as $condition) {
            $result = $standardLibrary->callFunction($condition, $inputParameters);
            if (\is_null($result) || $result === \false) {
                return \false;
            }
        }
        return \true;
    }
    public abstract function evaluate(array $inputParameters, RulesetStandardLibrary $standardLibrary);
}

```
