Sokil\Mongo\Collection\Definition::setOption PHP 메소드

setOption() 공개 메소드

public setOption ( $name, $value )
    public function setOption($name, $value)
    {
        $method = 'set' . $name;
        if (method_exists($this, $method)) {
            call_user_func(array($this, $method), $value);
        } elseif (property_exists($this, $name)) {
            $this->{$name} = $value;
        } else {
            $this->options[$name] = $value;
        }
        return $this;
    }