public function builder_call_update_children(Database_Query $builder, Jam_Event_Data $data, $old_path, $new_path) { if (FALSE === $builder instanceof Jam_Query_Builder_Update) { throw new InvalidArgumentException('Can only be used on "update" queries'); } $builder->value('path', DB::expr("TRIM(BOTH '/' FROM REPLACE(path, :old_path, :new_path))", array(':old_path' => $old_path, ':new_path' => $new_path))); }