Sha256: 4ed93033b3d333713223271920ddf98908f38f59061344e51529c2b643cc5d88

Contents?: true

Size: 558 Bytes

Versions: 7

Compression:

Stored size: 558 Bytes

Contents

<?php

namespace Predis\Options;

use Predis\Profiles\ServerProfile;
use Predis\Profiles\IServerProfile;

class ClientProfile extends Option {
    public function validate($value) {
        if ($value instanceof IServerProfile) {
            return $value;
        }
        if (is_string($value)) {
            return ServerProfile::get($value);
        }
        throw new \InvalidArgumentException(
            "Invalid value for the profile option"
        );
    }

    public function getDefault() {
        return ServerProfile::getDefault();
    }
}

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
appstats-0.25.1 doc/benchmarks/Predis/Options/ClientProfile.php
appstats-0.25.0 doc/benchmarks/Predis/Options/ClientProfile.php
appstats-0.24.0 doc/benchmarks/Predis/Options/ClientProfile.php
appstats-0.23.5 doc/benchmarks/Predis/Options/ClientProfile.php
appstats-0.23.4 doc/benchmarks/Predis/Options/ClientProfile.php
appstats-0.23.3 doc/benchmarks/Predis/Options/ClientProfile.php
appstats-0.23.2 doc/benchmarks/Predis/Options/ClientProfile.php