Phalcon\Mvc\Model\Behavior\NestedSet::__construct PHP Method

__construct() public method

public __construct ( $options = null )
    public function __construct($options = null)
    {
        if (isset($options['db']) && $options['db'] instanceof AdapterInterface) {
            $this->db = $options['db'];
        }
        if (isset($options['hasManyRoots'])) {
            $this->hasManyRoots = (bool) $options['hasManyRoots'];
        }
        if (isset($options['rootAttribute'])) {
            $this->rootAttribute = $options['rootAttribute'];
        }
        if (isset($options['leftAttribute'])) {
            $this->leftAttribute = $options['leftAttribute'];
        }
        if (isset($options['rightAttribute'])) {
            $this->rightAttribute = $options['rightAttribute'];
        }
        if (isset($options['levelAttribute'])) {
            $this->levelAttribute = $options['levelAttribute'];
        }
        if (isset($options['primaryKey'])) {
            $this->primaryKey = $options['primaryKey'];
        }
    }