dbObject::processHasOneWith PHP Méthode

processHasOneWith() private méthode

* Function building hasOne joins for get/getOne method
private processHasOneWith ( )
    private function processHasOneWith()
    {
        if (count($this->_with) == 0) {
            return;
        }
        foreach ($this->_with as $name => $opts) {
            $relationType = strtolower($opts[0]);
            $modelName = $opts[1];
            $key = null;
            if (isset($opts[2])) {
                $key = $opts[2];
            }
            if ($relationType == 'hasone') {
                $this->db->setQueryOption("MYSQLI_NESTJOIN");
                $this->join($modelName, $key);
            }
        }
    }