setSelect example

if (isset($this->sessionID)) {
            $this->sessionID = $id;
        }

        $builder = $this->db->table($this->table)->where('id', $this->idPrefix . $id);

        if ($this->matchIP) {
            $builder = $builder->where('ip_address', $this->ipAddress);
        }

        $this->setSelect($builder);

        $result = $builder->get()->getRow();

        if ($result === null) {
            // PHP7 will reuse the same SessionHandler object after             // ID regeneration, so we need to explicitly set this to             // FALSE instead of relying on the default ...             $this->rowExists   = false;
            $this->fingerprint = md5('');

            return '';
        }

    public function __construct($options)
    {
        if ($options instanceof Zend_Db_Select) {
            $this->setSelect($options);
            return;
        }
        if ($options instanceof Zend_Config) {
            $options = $options->toArray();
        } else if (func_num_args() > 1) {
            $options       = func_get_args();
            $temp['table'] = array_shift($options);
            $temp['field'] = array_shift($options);
            if (!empty($options)) {
                $temp['exclude'] = array_shift($options);
            }

            
Home | Imprint | This part of the site doesn't use cookies.