Horde_Rdo_Query::_fillJoinPlaceholders PHP Method

_fillJoinPlaceholders() protected method

Take a query array and replace @field@ placeholders with values that will match in the load query.
protected _fillJoinPlaceholders ( Horde_Rdo_Mapper $m1, Horde_Rdo_Mapper $m2, array $query ) : array
$m1 Horde_Rdo_Mapper Left-hand mapper
$m2 Horde_Rdo_Mapper Right-hand mapper
$query array The query to process placeholders on.
return array The query with placeholders filled in.
    protected function _fillJoinPlaceholders($m1, $m2, $query)
    {
        $q = array();
        foreach (array_keys($query) as $field) {
            $value = $query[$field];
            if (preg_match('/^@(.*)@$/', $value, $matches)) {
                $q[$m1->tableAlias . '.' . $field] = new Horde_Rdo_Query_Literal($m2->table . '.' . $matches[1]);
            } else {
                $q[$m1->tableAlias . '.' . $field] = $value;
            }
        }
        return $q;
    }